• Aryan Noshirvnai's avatar
    Add bulk Telegram chat scanning: approve a chat, tag+save every song in it · 00214e85
    Aryan Noshirvnai authored
    New foundation for scanning a whole chat instead of one song at a time:
    ApprovedChat (opt a chat in) and ChatScanJob (a background job that
    lists a chat's music, then downloads+identifies+tags+saves each song
    via the same pipeline /music/tag already uses per song). Mirrors
    RemixJob's proven pattern - a status column + BackgroundTasks, no new
    task-queue infrastructure - rather than inventing a new one.
    
    Deliberately on-demand (user approves a chat, then triggers one scan)
    rather than automatic background polling, which needs a materially
    different architecture (persistent per-user Telegram connections or a
    scheduler) not worth building until on-demand proves out the feature.
    
    Guardrails baked in from the start rather than bolted on later: a
    50-message cap per scan, a 5-scans/day per-user cap, no two concurrent
    scans of the same chat, and a 1.5s pause between songs so a scan reads
    like a real user, not a script hammering Telegram/AcoustID/Gemini.
    Per-song outcomes (saved/skipped_duplicate/failed) are tracked
    individually in results_json, not just one pass/fail for the whole job.
    
    _identify_tag_and_store's request param is now optional so the
    background job can call it without a live HTTP request in scope - same
    reasoning as RemixJob storing a bare filename instead of a full URL.
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
    00214e85
Name
Last commit
Last update
alembic Loading commit data...
deploy Loading commit data...
scripts Loading commit data...
src Loading commit data...
tests Loading commit data...
.env.example Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
alembic.ini Loading commit data...
docker-compose.yml Loading commit data...
requirements-remix.txt Loading commit data...
requirements.txt Loading commit data...
setup.sh Loading commit data...