Add option to sort by last modification date (close #88)

Store the metadate “last-modified” for a track and an album and add an
option sort by it.
This commit is contained in:
coderkun 2023-01-08 19:09:19 +01:00
commit 8607bf15a9

View file

@ -39,6 +39,7 @@ class LibraryToolbar(Gtk.ButtonBox):
sort_artist = Gtk.Template.Child()
sort_title = Gtk.Template.Child()
sort_year = Gtk.Template.Child()
sort_modified = Gtk.Template.Child()
grid_scale = Gtk.Template.Child()
@ -50,7 +51,8 @@ class LibraryToolbar(Gtk.ButtonBox):
self._toolbar_sort_buttons = {
SortOrder.ARTIST: self.sort_artist,
SortOrder.TITLE: self.sort_title,
SortOrder.YEAR: self.sort_year
SortOrder.YEAR: self.sort_year,
SortOrder.MODIFIED: self.sort_modified
}