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
10 changed files with 84 additions and 26 deletions

View file

@ -129,6 +129,22 @@
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="sort_modified">
<property name="label" translatable="yes">sort by modification</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">sort_year</property>
<signal name="toggled" handler="on_sort_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="toolbar_sort_order_button">
<property name="label">gtk-sort-descending</property>
@ -143,7 +159,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
<property name="position">6</property>
</packing>
</child>
</object>

View file

@ -4,6 +4,7 @@
<value nick="artist" value="0" />
<value nick="title" value="1" />
<value nick="year" value="2" />
<value nick="modified" value="3" />
</enum>
<schema path="/xyz/suruatoel/mcg/" id="xyz.suruatoel.mcg" gettext-domain="mcg">
<key type="s" name="host">