From e072f23cdb739837b69165b889c2792a815a192d Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 22 Aug 2024 14:24:27 +0200 Subject: fix(storage/get_videos): Also order by `publish_date` All freshly added videos have a priority of 0. To ensure that they are still ordered, also sort by `publish_date`. --- src/storage/video_database/getters.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/video_database/getters.rs b/src/storage/video_database/getters.rs index ca4164d..fd363fb 100644 --- a/src/storage/video_database/getters.rs +++ b/src/storage/video_database/getters.rs @@ -104,7 +104,7 @@ pub async fn get_videos( } } - qb.push("\n ORDER BY priority DESC;"); + qb.push("\n ORDER BY priority DESC, publish_date DESC;"); debug!("Will run: \"{}\"", qb.sql()); -- cgit 1.4.1