about summary refs log tree commit diff stats
path: root/src/select/cmds.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-14 12:32:23 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-14 12:34:56 +0200
commit145a776039248a9460e9473e4bc9ef3d533b60c1 (patch)
tree7b2a948ae1f08335eba477c26bf1d5e83cdac24b /src/select/cmds.rs
parentfix(downloader): Don't display changed cache size on first run (diff)
downloadyt-145a776039248a9460e9473e4bc9ef3d533b60c1.tar.gz
yt-145a776039248a9460e9473e4bc9ef3d533b60c1.zip
feat(videos): Provide a consistent display for the `Video` struct
Before, `Video`s where colourized differently, just because the
colourization was not standardized. It now is.
Diffstat (limited to '')
-rw-r--r--src/select/cmds.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/select/cmds.rs b/src/select/cmds.rs
index b45cc48..6e71607 100644
--- a/src/select/cmds.rs
+++ b/src/select/cmds.rs
@@ -19,6 +19,7 @@ use crate::{
         VideoOptions, VideoStatus,
     },
     update::video_entry_to_video,
+    videos::display::format_video::FormatVideo,
 };
 
 use anyhow::{bail, Context, Result};
@@ -57,7 +58,10 @@ pub async fn handle_select_cmd(
                     entry: yt_dlp::wrapper::info_json::InfoJson,
                 ) -> Result<()> {
                     let video = video_entry_to_video(entry, None)?;
-                    println!("{}", video.to_color_display(app).await?);
+                    println!(
+                        "{}",
+                        (&video.to_formatted_video(app).await?.colorize()).to_line_display()
+                    );
                     add_video(app, video).await?;
 
                     Ok(())