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:
parent
fde9a439df
commit
e10df8dcbd
27 changed files with 1420 additions and 107 deletions
26
migrations/versions/0008_channel_subscriber_count.py
Normal file
26
migrations/versions/0008_channel_subscriber_count.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"""channels.subscriber_count
|
||||
|
||||
Revision ID: 0008_channel_subscriber_count
|
||||
Revises: 0007_drop_access_expiry
|
||||
Create Date: 2026-09-17
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision: str = "0008_channel_subscriber_count"
|
||||
down_revision: Union[str, None] = "0007_drop_access_expiry"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# Subscriber count comes from YouTube channels.list (statistics part);
|
||||
# hidden counts stay NULL.
|
||||
op.add_column("channels", sa.Column("subscriber_count", sa.BigInteger(), nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("channels", "subscriber_count")
|
||||
Loading…
Add table
Add a link
Reference in a new issue