Skip to content

feat(playlist): curate members with --limit, --skip, --only, and --skip-only - #49

Merged
cmglezpdev merged 1 commit into
mainfrom
feat/playlist-curation-flags
Aug 20, 2026
Merged

cmglezpdev merged 1 commit into
mainfrom
feat/playlist-curation-flags

Conversation

@cmglezpdev

Copy link
Copy Markdown
Owner

What this changes

veta <playlist-url> can now extract a subset of the playlist: --only/--skip-only pick or exclude 1-based positions and ranges (1,3,5-8), and --skip/--limit paginate the filtered selection, in that order. Positions never renumber — NN- folder prefixes keep the member's original playlist position, and the [k/n] stderr counter runs over the selection.

Why

Long playlists forced all-or-nothing extraction. Curating members (resume a course from lesson 6, extract just the talks you care about) needed pagination and position filters. The flags were on the roadmap as the last pending piece of playlist support.

How to verify

pnpm test
pnpm build
node ./bin/cli.js extract --help          # four new flags listed
node ./bin/cli.js extract VIDEO_ID --limit 3   # fails fast: playlists only, exit 2
veta "<playlist-url>" --skip 5 --limit 10     # members 6..15, [k/10] on stderr

Validation is fail-fast: malformed specs (5-3, position 0), --only + --skip-only together, and curation flags on a single-video URL all error before any network work (INPUT_UNRECOGNIZED, exit 2). An empty selection fails after listing with PLAYLIST_EMPTY (exit 6). No new error codes.

Selection parsing/application is a pure domain module (src/domain/playlist/member-selection.ts, 31 unit tests); pipeline/CLI wiring adds 13 more tests on the existing fake-yt-dlp fixtures — zero mocks. The README also drops the stale versioned Status section and documents the cover download and stderr progress.

Checklist

  • pnpm typecheck and pnpm test pass
  • Commits follow Conventional Commits

…ip-only

Four flags on the extract command, playlist URLs only, over original
1-based member positions:

- --only / --skip-only take positions and inclusive ranges (1,3,5-8)
  and are mutually exclusive.
- --skip and --limit paginate the filtered selection, in that order.

Positions never renumber: NN- folder prefixes and the playlist record
keep original positions, while the [k/n] stderr counter runs over the
selection. Malformed specs fail before any network work; curation flags
on a single-video URL fail with INPUT_UNRECOGNIZED; a selection that
matches no members fails with PLAYLIST_EMPTY after listing.

Selection parsing and application live in the pure domain module
src/domain/playlist/member-selection.ts. README and roadmap updated in
the same change; the README also drops the stale versioned Status
section and documents the cover download and stderr progress.
@cmglezpdev
cmglezpdev merged commit 6be9b61 into main Aug 20, 2026
3 checks passed
@cmglezpdev
cmglezpdev deleted the feat/playlist-curation-flags branch August 25, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant