forked from Wobbl/Wobuzz
Added display of track genres.
This commit is contained in:
parent
9e20e21e6f
commit
209335b005
4 changed files with 18 additions and 9 deletions
|
@ -30,13 +30,14 @@ class PlaylistView(QTreeWidget):
|
|||
|
||||
self.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection)
|
||||
|
||||
self.setColumnCount(4)
|
||||
self.setColumnCount(5)
|
||||
|
||||
headers = [
|
||||
"#",
|
||||
"Title",
|
||||
"Artist",
|
||||
"Album",
|
||||
"Genre",
|
||||
"# Custom Sorting"
|
||||
]
|
||||
|
||||
|
@ -98,7 +99,7 @@ class PlaylistView(QTreeWidget):
|
|||
track.setText(0, str(i)) # 0 = index
|
||||
|
||||
if user_sort:
|
||||
track.setText(4, str(i)) # 4 = user sort index
|
||||
track.setText(5, str(i)) # 5 = user sort index
|
||||
|
||||
if user_sort:
|
||||
# set last sort to user sort
|
||||
|
@ -107,7 +108,7 @@ class PlaylistView(QTreeWidget):
|
|||
|
||||
self.playlist.sorting.append(WBZM3UData.SortOrder(WBZM3UData.SortOrder.custom_sorting, True))
|
||||
|
||||
self.header.setSortIndicator(4, Qt.SortOrder.AscendingOrder)
|
||||
self.header.setSortIndicator(5, Qt.SortOrder.AscendingOrder)
|
||||
|
||||
self.playlist.sync(self, user_sort) # sync playlist to this view
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue