about summary refs log tree commit diff stats
path: root/yt/src/comments
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--yt/src/comments/mod.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/yt/src/comments/mod.rs b/yt/src/comments/mod.rs
index 97b2c24..1482f15 100644
--- a/yt/src/comments/mod.rs
+++ b/yt/src/comments/mod.rs
@@ -18,10 +18,7 @@ use yt_dlp::wrapper::info_json::{Comment, InfoJson, Parent};
 
 use crate::{
     app::App,
-    storage::video_database::{
-        Video,
-        getters::{get_currently_playing_video, get_video_info_json},
-    },
+    storage::video_database::{Video, get},
     unreachable::Unreachable,
 };
 
@@ -29,20 +26,21 @@ mod comment;
 mod display;
 pub mod output;
 
+pub mod description;
+pub use description::*;
+
 #[allow(clippy::too_many_lines)]
 pub async fn get(app: &App) -> Result<Comments> {
     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 mut 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 mut 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",
+    );
 
     let base_comments = mem::take(&mut info_json.comments).with_context(|| {
         format!(