fixed error in 'AlbumIconView' 'populate'

This commit is contained in:
Martin Wagner 2020-04-01 17:39:59 +02:00
parent 173adb5090
commit a0b4fdce8b

View File

@ -1220,7 +1220,10 @@ class AlbumIconView(Gtk.IconView):
GLib.idle_add(self.emit, "done") GLib.idle_add(self.emit, "done")
return return
#display albums #display albums
self.store.set_sort_column_id(Gtk.TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, Gtk.SortType.ASCENDING) if self.settings.get_boolean("sort-albums-by-year"):
albums = sorted(albums, key=lambda k: k['year'])
else:
albums = sorted(albums, key=lambda k: k['album'])
music_lib=self.settings.get_value("paths")[self.settings.get_int("active-profile")] music_lib=self.settings.get_value("paths")[self.settings.get_int("active-profile")]
size=self.settings.get_int("album-cover") size=self.settings.get_int("album-cover")
z=0 z=0
@ -1247,7 +1250,6 @@ class AlbumIconView(Gtk.IconView):
z=z+1 z=z+1
else: else:
break break
GLib.idle_add(self.sort_settings)
GLib.idle_add(self.emit, "done") GLib.idle_add(self.emit, "done")
def scroll_to_selected_album(self): def scroll_to_selected_album(self):