diff options
| -rw-r--r-- | crates/yt/src/commands/status/implm.rs | 11 |
1 files changed, 10 insertions, 1 deletions
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}" ); } |
