Merge branch 'master' into 'master'
Sort artists AlbumsListWithSongs albums by year See merge request sublime-music/sublime-music!46
This commit is contained in:
@@ -613,7 +613,9 @@ class AlbumsListWithSongs(Gtk.Overlay):
|
|||||||
self.spinner.hide()
|
self.spinner.hide()
|
||||||
return
|
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:
|
if self.albums == new_albums:
|
||||||
# Just go through all of the colidren and update them.
|
# Just go through all of the colidren and update them.
|
||||||
|
Reference in New Issue
Block a user