From 8d7df29bbce0ceb258fa6c591003d379fcdb704f Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 17 Feb 2025 19:36:27 +0100 Subject: 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. --- yt/src/status/mod.rs | 9 +++++++-- 1 file 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(()) -- cgit 1.4.1