Repository navigation
feat: playlist/Mix links download one video; Cancel button for downloads - #37
Merged
Merged
Conversation
A Mix link shared from the YouTube app (playlist?list=RD<id>) left the app on "Starting download..." forever: yt-dlp took it as a whole playlist, and a Mix never ends. download_video now reduces any YouTube playlist link to one video: the v= / youtu.be video, the video a Mix is named after (RD<id>, RDAMVM<id>), or, for a playlist that names no video, its first entry (one flat lookup). While a manual download runs, its row's Download button becomes a red Cancel button. Cancelling frees the row at once; download_video stops at the next progress or postprocessor event, skips the player-client retry, and deletes the files that run wrote (new since it started, named after its video), never anything that was already in the folder. Hosted override files stop and drop their .part. A new download on the same row waits for that cleanup first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Playlist and Mix links download one video. A Mix link shared from the YouTube app (
playlist?list=RD<id>&playnext=1) left the app on "Starting download..." forever, reported from the church PC on 2026-10-24. yt-dlp took it as a whole playlist, and a Mix never ends.download_videonow reduces every YouTube playlist link to one video:v=/youtu.be/<id>: that video, with the list droppedlist=RD<id>, YouTube MusicRDAMVM<id>): the video it is named after, with no network lookupplaylist_items=1lookup; an unreadable playlist is an error, not a hangCancel button (option A of the UI mockups the operator approved). While a manual download runs, its row's Download button becomes a red ✕ Cancel (Others row) or ✕ Cancel download (channel rows).
download_video(cancel_event=...)stops at the next progress or postprocessor event, skips the player-client retry, and returnsDOWNLOAD_CANCELLED..part, a finished video-only stream,.temp.mp4or the pre-mp3.webm. Anything already in the folder, and other downloads' files, stay..partfile.Verified
pytest: 340 passed. New tests cover link reduction, first-entry lookup, an unreadable playlist, cancel mid-download (only that run's files go, no retry), cancel before start, hosted-file cancel, the button toggle, a silent cancelled worker, a stale worker leaving a newer download alone, and a restart waiting for cleanup..partwas deleted, a pre-existing file was kept, and there was no retry.Not covered: automatic (Fri/Sat) downloads have no row button, so they can't be cancelled.
🤖 Generated with Claude Code