feat(header): clarify video counts and hide idle pause button

Show 'N yours / M total' in the header (your subscriptions vs. the whole shared
catalog) with a tooltip, backed by a new total_videos field on /sync/my-status.
The admin pause button now only appears when there's sync work to pause; Resume
still shows whenever sync is paused.
This commit is contained in:
npeter83 2026-06-14 18:42:55 +02:00
parent d791d577a0
commit edf8887d8b
3 changed files with 18 additions and 3 deletions

View file

@ -152,6 +152,9 @@ def my_status(
),
)
)
# Whole-catalog total (every video any user's subscriptions have pulled in), so the
# header can show "yours" against the shared library size.
total_videos = db.scalar(select(func.count(Video.id)))
return {
"channels_total": total,
"channels_details_synced": details_synced,
@ -163,6 +166,7 @@ def my_status(
"deep_pending_count": deep_eta["channels_pending"],
"deep_eta_seconds": deep_eta["eta_seconds"],
"my_videos": my_videos or 0,
"total_videos": total_videos or 0,
"quota_used_today": quota.units_used_today(db),
"quota_remaining_today": quota.remaining_today(db),
"paused": state.is_sync_paused(db),