• 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
..
fixtures Loading commit data...
conftest.py Loading commit data...
test_audio_processing.py Loading commit data...
test_auth.py Loading commit data...
test_channels.py Loading commit data...
test_database.py Loading commit data...
test_discovery.py Loading commit data...
test_docs_auth.py Loading commit data...
test_library.py Loading commit data...
test_music.py Loading commit data...
test_remix.py Loading commit data...
test_remix_engine.py Loading commit data...
test_rooms_websocket.py Loading commit data...
test_social.py Loading commit data...
test_soundmarks.py Loading commit data...
test_telegram_scan.py Loading commit data...
test_telegram_sync.py Loading commit data...