-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't workinggood-first-issueGood for newcomersGood for newcomers
Description
Description
In app/api/videos.py, the /api/videos/{video_id}/cancel endpoint sets the global Video.status to CATALOGED.
@router.post("/{video_id}/cancel")
async def cancel_download(...):
...
video.status = "CATALOGED"
await db.commit()Impact
Since NullFeed is a multi-user media center, a video download might be requested by or relevant to multiple users. If User A cancels a download, it instantly changes the status for User B as well. Furthermore, it doesn't actually stop the running Celery background task, leading to state inconsistencies (the file might still finish downloading and get cataloged).
Suggested Fix
Instead of changing the global video status, cancel requests should manage a user-specific reference (e.g., in UserVideoRef). The global download task should only be canceled if no users are actively tracking it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood-first-issueGood for newcomersGood for newcomers