Channel features: subscribers, new-videos badges, activity-driven sync

- Store subscriber count from YouTube statistics and show it on channel page
- Sync 50 videos per channel with playlistItems pagination support
- Show per-channel and per-category new-videos counters (2-day window)
- Replace hourly videos sync with activity trigger (2h idle) and
  incremental backfill (hard cap 200 per channel)
- Clicking the sidebar new-videos count filters the category feed to
  recent videos only (new_only)
- Update agent-team docs: deploy after green checks
This commit is contained in:
vrubelroman 2026-09-17 21:07:33 +00:00
parent fde9a439df
commit e10df8dcbd
27 changed files with 1420 additions and 107 deletions

View file

@ -32,8 +32,19 @@ class Settings(BaseSettings):
metube_request_timeout_seconds: int = 30
subscriptions_sync_interval_hours: int = 6
videos_sync_interval_minutes: int = 60
videos_per_channel_sync: int = 10
# Videos sync is no longer scheduled: it is triggered by user activity
# (any authenticated request) after this much idle time since the last
# completed sync.
videos_sync_idle_hours: int = 2
# Hard history-depth limit per channel per videos sync: at most the
# newest N playlist items are considered; anything older is never
# backfilled by design (full channel history is out of scope).
videos_backfill_cap: int = 200
# Stop playlistItems pagination for a channel once this many already
# known video ids are seen in a row (the rest of the playlist is history
# we have already synced).
videos_known_stop_threshold: int = 50
new_videos_window_days: int = 2
log_level: str = "INFO"