about summary refs log tree commit diff stats
path: root/crates/yt/src/version/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--crates/yt/src/version/mod.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/crates/yt/src/version/mod.rs b/crates/yt/src/version/mod.rs
index 9a91f3b..b12eadd 100644
--- a/crates/yt/src/version/mod.rs
+++ b/crates/yt/src/version/mod.rs
@@ -10,11 +10,11 @@
 
 use anyhow::{Context, Result};
 use sqlx::{SqlitePool, sqlite::SqliteConnectOptions};
-use yt_dlp::YoutubeDLOptions;
+use yt_dlp::options::YoutubeDLOptions;
 
 use crate::{config::Config, storage::migrate::get_version_db};
 
-pub async fn show(config: &Config) -> Result<()> {
+pub(crate) async fn show(config: &Config) -> Result<()> {
     let db_version = {
         let options = SqliteConnectOptions::new()
             .filename(&config.paths.database_path)
@@ -30,17 +30,20 @@ pub async fn show(config: &Config) -> Result<()> {
             .context("Failed to determine database version")?
     };
 
-    let yt_dlp_version = {
+    let (yt_dlp, python) = {
         let yt_dlp = YoutubeDLOptions::new().build()?;
-        yt_dlp.version()
+        yt_dlp.version()?
     };
 
+    let python = python.replace('\n', " ");
+
     println!(
         "{}: {}
 
 db version: {db_version}
 
-yt-dlp: {yt_dlp_version}",
+yt-dlp: {yt_dlp}
+python: {python}",
         env!("CARGO_PKG_NAME"),
         env!("CARGO_PKG_VERSION"),
     );