diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-22 14:24:27 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-22 14:24:27 +0200 |
commit | e072f23cdb739837b69165b889c2792a815a192d (patch) | |
tree | eb0ebea966c651fd74cffe15bc47f6f97995c70a /src/storage/video_database/getters.rs | |
parent | feat(select/file): Allow `--priority` argument to all functions (diff) | |
download | yt-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/getters.rs')
-rw-r--r-- | src/storage/video_database/getters.rs | 2 |
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()); |