feat: playlists command for bulk playlist operations#25
Merged
Conversation
Adds ytstudio playlists list/show/create/update/delete/items/add/remove/reorder covering the playlist surface YouTube Studio handles poorly at scale. Power moves: bulk-add by search query, reorder by views. All writes are dry-run by default; --execute applies.
This was referenced Jun 9, 2026
- add --position increments per insert so multi-video adds keep CLI order - combining --video and --from-search now respects --limit - uploads guard resolves the canonical channel uploads id via channels.list instead of the brittle UU-prefix heuristic - reorder skips writes that would be no-ops after prior shifts - bulk loops route through a small helper that turns RefreshError into a friendly "session expired" exit instead of an unhandled exception - CSV output for list and items uses csv.writer so embedded commas, quotes, and newlines survive round-trips - docs: new docs/playlists.md guide, added to the Guides nav
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.
Summary
ytstudio playlistssub-app with 9 commands: list, show, create, update, delete, items, add, remove, reorder.--executeapplies. Quota counters and partial-progress reporting on every bulk loop.Highlights
ytstudio playlists add PL... --from-search "shorts compilation" -n 20 --executeytstudio playlists reorder PL... --by views --executeUU...) are refused early for any mutating command.manualSortRequired,playlistContainsMaximumNumberOfVideos,videoNotFound,quotaExceeded.Test plan
uv run ruff check .uv run ruff format --check .uv run pytest -q(238 passed)Out of scope
playlists sync FILE.yaml); follow-up PR.