From 11a58ff7a772745c533dce0915b4f2b6d80b6bce Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 26 May 2026 18:28:12 +0200 Subject: feat(yt/select/file): Allow sorting the videos by other things then priority --- .../src/commands/select/implm/fs_generators/mod.rs | 47 ++++++++++++++++++---- crates/yt/src/commands/select/implm/mod.rs | 16 +++++++- crates/yt/src/commands/select/mod.rs | 47 +++++++++++++++++++--- crates/yt/src/storage/db/video/mod.rs | 2 +- 4 files changed, 98 insertions(+), 14 deletions(-) diff --git a/crates/yt/src/commands/select/implm/fs_generators/mod.rs b/crates/yt/src/commands/select/implm/fs_generators/mod.rs index 10da032..a0f9098 100644 --- a/crates/yt/src/commands/select/implm/fs_generators/mod.rs +++ b/crates/yt/src/commands/select/implm/fs_generators/mod.rs @@ -24,7 +24,7 @@ use crate::{ commands::{ Command, select::{ - SelectCommand, SelectSplitSortKey, SelectSplitSortMode, + SelectCommand, SelectFileSortKey, SelectSplitSortKey, SortMode, implm::standalone::{self, handle_select_cmd}, }, }, @@ -48,7 +48,7 @@ pub(crate) async fn select_split( app: &App, done: bool, sort_key: SelectSplitSortKey, - sort_mode: SelectSplitSortMode, + sort_mode: SortMode, ) -> Result<()> { let temp_dir = tempfile::Builder::new() .prefix("yt_video_select-") @@ -81,7 +81,7 @@ pub(crate) async fn select_split( match sort_key { SelectSplitSortKey::Publisher => { - // PERFORMANCE: The clone here should not be neeed. <2025-06-15> + // PERFORMANCE: The clone here should not be needed. <2025-06-15> temp_vec.sort_by_key(|(name, _): &(String, Vec