Fixes the 'cancelled but still shows running' stuck bug and adds real depth: - classify_state now distinguishes 'cancelled' from 'failed'. - Monitor is robust to slskd forgetting a transfer: if it's gone, it first tries to complete from the FILE on disk (survives the music 'Clean Completed Downloads' auto-clear), else counts misses and fails the row after ~8 polls instead of hanging on 'downloading' forever. Cancelled transfers → cancelled status. - POST /downloads/cancel (slskd DELETE transfer + mark cancelled) and /downloads/retry (re-grab the same release). get_video_download(id) added; clear includes cancelled. process_download stays pure (fs/slskd injected); 15 tests, ruff + guard clean. Phase B (page: tabs/queue/history/cancel+retry buttons) next. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||
| personalized_schema.py | ||
| video_database.py | ||
| video_schema.sql | ||