diff --git a/YouTube-Upload-Logic.md b/YouTube-Upload-Logic.md new file mode 100644 index 0000000..0630281 --- /dev/null +++ b/YouTube-Upload-Logic.md @@ -0,0 +1,30 @@ +# YouTube Upload Logic + +This page describes how videos are uploaded to YouTube and how metadata, playlists, thumbnails, and recording dates are handled. + +## Upload Function + +Uploads are handled by: +```python +upload_video(file_path, is_vertical, stream_date, description=None, private=False) +``` + +## Workflow + +1. Authenticate via OAuth +2. Generate title and description: + - Uses stream date and `notes.txt` (if present) +3. Upload video with privacy setting +4. **If widescreen**, generate and upload thumbnail +5. Add video to playlist: + - Shorts → `YT_PLAYLIST_ID_SHORTS` + - Clips → `YT_PLAYLIST_ID_CLIPS` +6. Set recording date using parsed `YYYY.MM.DD` + +## Thumbnail Handling + +- Thumbnail upload occurs **after** the video is successfully uploaded +- Thumbnail is skipped for vertical videos (Shorts) +- Notes file is used to guide prompt generation (for future AI images) + +---