Repository navigation
feat: add playlists manually by URL - #4
Merged
Merged
Conversation
- ytdlp.playlist_id_from_url: bare id, playlist URL, or any URL with list= (watch/shorts/share); None otherwise - new playlists.manual boolean (default false, server_default for existing rows), exposed as manual in playlist_dict() - alembic 0003 adds the column with an existence guard (fresh DBs already got it via 0001 metadata.create_all)
Validates with yt-dlp --flat-playlist -J (no login, works for unlisted), then creates a manual row: title = provided title or the playlist id, state new, remote_status active, remote_item_count from the listing. No auto-enqueue - the row uses the existing Download now / Sync now buttons. 422 bad type/url, 409 duplicate (incl. unique-constraint race), 400 not accessible. Stub now answers unknown playlist ids with exit 1 instead of KeyError.
One form above each table: playlist URL or id, optional title, 'Add playlist' button. Submits to POST /api/playlists, shows the server error inline (no alert, no page reload), refreshes via tick(true). New rows carry a 'manual' badge in the title column. Inputs stack to full width below 768px. English strings only.
SPEC: new 6.10 requirement (form per tab, yt-dlp validation, 409/400/422, no auto-enqueue, nightly sync included), playlists.manual in 7, POST row in 8, add form + badge in 9, changelog entry in 14. README: 'Adding a playlist manually' section. MANUAL-PLAYLIST.md shrunk to a completion pointer (behaviour lives in SPEC/README now), references cleaned up, PLAN status + decision log.
# Conflicts: # README.md
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
Adds manual playlist entry for playlists that never show up in the channel listing (unlisted, removed from the channel, belonging to someone else) – the feature formerly drafted in
MANUAL-PLAYLIST.md.manualbadge. Inputs stack full-width below 768 px.POST /api/playlistsvalidates withyt-dlp --flat-playlist -J(no login, works for unlisted), then creates the row:manual=true, title = provided title or the playlist id,state=new,remote_status=active,remote_item_countfrom the listing. No auto-enqueue – the existing Download now / Sync now buttons start it. 422 bad input, 400 not accessible, 409 duplicate (incl. unique-constraint race).playlists.manualboolean (default false), alembic migration0003with an existence guard – safe for existing databases, idempotent on re-run.playlist_id_from_urlaccepts bare ids, playlist URLs and&list=in any YouTube URL.KeyError.Docs
SPEC §6.10 (requirement), §7 (
manualcolumn), §8 (endpoint), §9 (form + badge), §14 (changelog); README sectionAdding a playlist manually;MANUAL-PLAYLIST.mdshrunk to a completion pointer; PLAN status + decision log.Tests
6 new tests (row creation incl. no-enqueue, title variant, 422/409/400, stub unknown-id, UI forms, migration idempotence) plus the parser unit tests.
ruff check .clean,pytest -q178 passed,node --check app/static/app.jsok.