improved sorting in SongsView

This commit is contained in:
Martin Wagner 2020-05-18 20:05:32 +02:00
parent dab40be20c
commit 98d55d3caf

View File

@ -905,7 +905,7 @@ class SongsView(Gtk.TreeView):
#store
#(track, title, artist, album, duration, file)
self.store=Gtk.ListStore(str, str, str, str, str, str)
self.store=Gtk.ListStore(int, str, str, str, str, str)
self.set_model(self.store)
#selection
@ -987,7 +987,7 @@ class SongsView(Gtk.TreeView):
def populate(self, songs):
for s in songs:
song=self.client.extend_song_for_display(self.client.song_to_str_dict(s))
self.store.append([song["track"], song["title"], song["artist"], song["album"], song["human_duration"], song["file"]])
self.store.append([int(song["track"]), song["title"], song["artist"], song["album"], song["human_duration"], song["file"]])
def clear(self):
self.store.clear()