diff options
Diffstat (limited to '')
-rw-r--r-- | yt/src/comments/description.rs (renamed from yt/src/description/mod.rs) | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/yt/src/description/mod.rs b/yt/src/comments/description.rs index f31c027..e743e46 100644 --- a/yt/src/description/mod.rs +++ b/yt/src/comments/description.rs @@ -11,10 +11,7 @@ use crate::{ App, comments::output::display_fmt_and_less, - storage::video_database::{ - Video, - getters::{get_currently_playing_video, get_video_info_json}, - }, + storage::video_database::{Video, get}, unreachable::Unreachable, }; @@ -30,17 +27,15 @@ pub async fn description(app: &App) -> Result<()> { pub async fn get(app: &App) -> Result<String> { let currently_playing_video: Video = - if let Some(video) = get_currently_playing_video(app).await? { + if let Some(video) = get::currently_focused_video(app).await? { video } else { bail!("Could not find a currently playing video!"); }; - let info_json: InfoJson = get_video_info_json(¤tly_playing_video) - .await? - .unreachable( - "A currently *playing* must be cached. And thus the info.json should be available", - ); + let info_json: InfoJson = get::video_info_json(¤tly_playing_video)?.unreachable( + "A currently *playing* must be cached. And thus the info.json should be available", + ); Ok(info_json .description |