about summary refs log tree commit diff stats
path: root/src/storage/video_database
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-22 14:24:27 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-22 14:24:27 +0200
commite072f23cdb739837b69165b889c2792a815a192d (patch)
treeeb0ebea966c651fd74cffe15bc47f6f97995c70a /src/storage/video_database
parentfeat(select/file): Allow `--priority` argument to all functions (diff)
downloadyt-e072f23cdb739837b69165b889c2792a815a192d.tar.gz
yt-e072f23cdb739837b69165b889c2792a815a192d.zip
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`.
Diffstat (limited to 'src/storage/video_database')
-rw-r--r--src/storage/video_database/getters.rs2
1 files changed, 1 insertions, 1 deletions
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());