about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--yt/src/comments/description.rs (renamed from yt/src/description/mod.rs)15
-rw-r--r--yt/src/main.rs3
2 files changed, 6 insertions, 12 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(&currently_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(&currently_playing_video)?.unreachable(
+        "A currently *playing* must be cached. And thus the info.json should be available",
+    );
 
     Ok(info_json
         .description
diff --git a/yt/src/main.rs b/yt/src/main.rs
index ed24262..6106117 100644
--- a/yt/src/main.rs
+++ b/yt/src/main.rs
@@ -42,7 +42,6 @@ pub mod cache;
 pub mod comments;
 pub mod config;
 pub mod constants;
-pub mod description;
 pub mod download;
 pub mod select;
 pub mod status;
@@ -239,7 +238,7 @@ async fn main() -> Result<()> {
             comments::comments(&app).await?;
         }
         Command::Description {} => {
-            description::description(&app).await?;
+            comments::description(&app).await?;
         }
     }