diff --git a/app/models.py b/app/models.py index 49c79a3..63cc2f0 100644 --- a/app/models.py +++ b/app/models.py @@ -128,13 +128,13 @@ class Playdates(dbtables.PlaydatesTable): ) -> Sequence["Playdates"]: """ Return a list of the last limit playdates for this track, sorted - earliest to latest. + latest to earliest. """ return session.scalars( Playdates.select() .where(Playdates.track_id == track_id) - .order_by(Playdates.lastplayed.asc()) + .order_by(Playdates.lastplayed.desc()) .limit(limit) ).all() diff --git a/app/playlistmodel.py b/app/playlistmodel.py index a075a74..034c781 100644 --- a/app/playlistmodel.py +++ b/app/playlistmodel.py @@ -1559,7 +1559,7 @@ class PlaylistModel(QAbstractTableModel): "
".join( [ a.lastplayed.strftime(Config.LAST_PLAYED_TOOLTIP_DATE_FORMAT) - for a in reversed(playdates) + for a in playdates ] ) )