Skip to content

feat: videos upload command - #15

Merged
jdwit merged 17 commits into
mainfrom
feat/videos-upload
May 28, 2026
Merged

jdwit merged 17 commits into
mainfrom
feat/videos-upload

Conversation

@jdwit

@jdwit jdwit commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • New yts videos upload <path> (single file or directory) bulk-uploads videos described by YAML sidecars; idempotent on re-run via video_id written back into the sidecar
  • Optional publish_at schedules a private video for future release (forces privacy=private)
  • Optional .jpg or .png thumbnail with matching basename, automatically applied via thumbnails.set
  • Quota-aware: stops cleanly on quotaExceeded, --max N caps a run, dry-run by default
  • Companion: yts videos list --scheduled lists private videos with a future publishAt
  • Two new runtime deps: pydantic>=2.5 (sidecar validation) and ruamel.yaml>=0.18 (write-back with comment preservation)

Test plan

  • yts videos upload --help shows path, --execute, --max
  • Dry-run on a directory with one video + sidecar prints the preview table
  • --execute on the same directory: video lands on YouTube, sidecar gets video_id + uploaded_at patched in
  • Re-run with --execute: skipped (already uploaded)
  • --scheduled filter: list a private video with a future publishAt, run yts videos list --scheduled, confirm only that one shows up
  • Thumbnail (.jpg or .png) next to video gets picked up and set after upload

@socket-security

socket-security Bot commented May 27, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpydantic@​2.13.4100100100100100
Addedruamel-yaml@​0.19.1100100100100100

View full report

jdwit added 3 commits May 28, 2026 07:16
- upload: print video_id and URL before write_back so a write_back failure
  no longer hides the id; surface the failure with a manual-patch hint to
  prevent duplicate re-uploads
- upload: drop handle_api_error call inside the quota handler so the loop
  breaks cleanly to the final summary; exit non-zero after summary on quota
- discover: raise on orphan .yaml sidecars and near-miss thumbnail extensions
  (.jpeg/.gif/.webp/.bmp) instead of silently ignoring them
- videos: revert out-of-scope fetch_videos snippet-source switch; keep
  scheduled_publish_at sourced from videos.list status as before
- upload_pipeline: pass num_retries=3 to next_chunk so transient API/network
  errors retry during resumable upload
Add a Development section to README pointing contributors at
`pre-commit install`, so the same ruff check + ruff format that CI runs also
fires locally. Pre-commit is already in the dev group and configured in
.pre-commit-config.yaml; the hook just needs installing once per clone.

Also pick up a missing trailing newline in .editorconfig flagged by the
end-of-file-fixer hook.
@jdwit
jdwit merged commit 8ba88b9 into main May 28, 2026
5 checks passed
@jdwit
jdwit deleted the feat/videos-upload branch May 28, 2026 14:42
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