feat: add -videoID flag to set thumbnail on existing videos#218
Open
dandaka wants to merge 1 commit into
Open
Conversation
Allows updating the thumbnail on an already-uploaded video without re-uploading. Useful when the initial thumbnail upload fails or when a thumbnail needs to be changed after the fact. Usage: youtubeuploader -videoID <id> -thumbnail <file> Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
-videoIDflag that, combined with-thumbnail, allows setting a thumbnail on an already-uploaded video via the YouTube Data API v3thumbnails.setendpoint-videoID+-thumbnailtriggers the new thumbnail-only mode;-videoID+-filenameis rejected; existing upload behavior is unchangedChanges
files.go: AddedVideoIDfield toConfigstructcmd/youtubeuploader/main.go: Added-videoIDflag, validation logic to route between upload and thumbnail-set modesthumbnail.go: New file withSetThumbnail()function — opens thumbnail (file or URL via existingOpen()), builds OAuth client, callsThumbnails.Set()Usage
Test plan
go buildcompiles cleanly-videoIDwithout-thumbnail→ error-videoIDwith-filename→ error-videoIDwith-thumbnail→ successfully sets thumbnail via YouTube API (tested against a real video)