diff --git a/app/db/userdata.py b/app/db/userdata.py index c09ae9a9..d8ca569f 100644 --- a/app/db/userdata.py +++ b/app/db/userdata.py @@ -498,9 +498,13 @@ class MixTable(Base): @classmethod def get_all(cls, with_userid: bool = False): if with_userid: - result = cls.execute(select(cls).where(cls.userid == get_current_userid())) + result = cls.execute( + select(cls) + .where(cls.userid == get_current_userid()) + .order_by(cls.timestamp.desc()) + ) else: - result = cls.execute(select(cls)) + result = cls.execute(select(cls).order_by(cls.timestamp.desc())) return Mix.mixes_to_dataclasses(result.fetchall()) diff --git a/app/plugins/mixes.py b/app/plugins/mixes.py index 36924b5b..999b8ad2 100644 --- a/app/plugins/mixes.py +++ b/app/plugins/mixes.py @@ -475,6 +475,7 @@ class MixesPlugin(Plugin): "albums": None, }, ) + trackmix.timestamp = mix.timestamp # INFO: Write track mix save state if mix.extra.get("trackmix_saved"):