Sort artists AlbumsListWithSongs albums by year

This commit is contained in:
sentriz
2020-07-11 18:43:54 +01:00
parent c9a63bdf0b
commit ec5cc03b0f

View File

@@ -613,7 +613,9 @@ class AlbumsListWithSongs(Gtk.Overlay):
self.spinner.hide()
return
new_albums = sorted(artist.albums or [], key=lambda a: a.name)
new_albums = sorted(
artist.albums or [], key=lambda a: (a.year or float("inf"), a.name)
)
if self.albums == new_albums:
# Just go through all of the colidren and update them.