diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-02-17 19:36:27 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-02-17 19:36:27 +0100 |
commit | 8d7df29bbce0ceb258fa6c591003d379fcdb704f (patch) | |
tree | 753276ec3b66ac6227afd03220060cb1ddb6fa51 | |
parent | refactor(yt/videos/display): Streamline video formatting (diff) | |
download | yt-8d7df29bbce0ceb258fa6c591003d379fcdb704f.zip |
fix(yt/status): Show the current database version
This will always be the latest available version (because `yt` tries to migrate the db at startup), but it is still some-what informative.
-rw-r--r-- | yt/src/status/mod.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/yt/src/status/mod.rs b/yt/src/status/mod.rs index 345ae3c..501bcf3 100644 --- a/yt/src/status/mod.rs +++ b/yt/src/status/mod.rs @@ -10,7 +10,9 @@ use std::time::Duration; -use crate::select::selection_file::duration::Duration as YtDuration; +use crate::{ + select::selection_file::duration::Duration as YtDuration, storage::migrate::get_version, +}; use anyhow::{Context, Result}; use bytes::Bytes; @@ -104,6 +106,8 @@ pub async fn show(app: &App) -> Result<()> { } }; + let db_version = get_version(app).await?; + let cache_usage_raw = Downloader::get_current_cache_allocation(app) .await .context("Failed to get current cache allocation")?; @@ -122,7 +126,8 @@ Dropped Videos: {dropped_videos_len} {watchtime_status} Subscriptions: {subscriptions_len} - Cache usage: {cache_usage}" + Cache usage: {cache_usage} + DB version: {db_version}" ); Ok(()) |