Fix order of playdates on hover

Fixes: #275
This commit is contained in:
Keith Edmunds 2025-02-14 19:27:47 +00:00
parent 955bea2037
commit 33e2c4bf31
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -1559,7 +1559,7 @@ class PlaylistModel(QAbstractTableModel):
"<br>".join(
[
a.lastplayed.strftime(Config.LAST_PLAYED_TOOLTIP_DATE_FORMAT)
for a in reversed(playdates)
for a in playdates
]
)
)