Created YouTube Upload Logic (markdown)

Gramps
2025-07-25 19:47:58 -07:00
parent 04f3dd445c
commit 219fcb87e5

30
YouTube-Upload-Logic.md Normal file

@ -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)
---