From 2ab1e54e36f0b9caeb7a0258c75476d3b53b61fd Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 30 Nov 2025 15:13:21 +0100 Subject: fix(yt/commands/status): Show active subscriptions number --- crates/yt/src/commands/status/implm.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/yt/src/commands/status/implm.rs b/crates/yt/src/commands/status/implm.rs index dabc5df..5832fde 100644 --- a/crates/yt/src/commands/status/implm.rs +++ b/crates/yt/src/commands/status/implm.rs @@ -58,6 +58,11 @@ impl StatusCommand { let dropped_videos_len = get!(all_videos, Dropped); let subscriptions = Subscriptions::get(app).await?; + let active_subscriptions_len = subscriptions + .0 + .iter() + .filter(|(_, sub)| sub.is_active) + .count(); let subscriptions_len = subscriptions.0.len(); let watchtime_status = { @@ -130,6 +135,10 @@ impl StatusCommand { "{subscriptions_len}", subscriptions_len.to_string().as_str(), ) + .replace( + "{active_subscriptions_len}", + active_subscriptions_len.to_string().as_str(), + ) .replace("{cache_usage}", cache_usage.to_string().as_str()); print!("{output}"); @@ -147,7 +156,7 @@ Dropped Videos: {dropped_videos_len} {watchtime_status} - Subscriptions: {subscriptions_len} + Subscriptions: {subscriptions_len} ({active_subscriptions_len} active) Cache usage: {cache_usage}" ); } -- cgit 1.4.1