2
YouTube Upload Logic
Gramps edited this page 2025-08-05 22:08:09 -07:00

⬆️ YouTube Upload Logic

This page outlines how videos are uploaded to YouTube using the LCS Pipeline, including playlist targeting, category assignment, and format-specific handling.


🚀 Upload Method

Uploads are handled via the YouTube Data API v3 using OAuth credentials provided in your .env file.

Main upload logic lives in:

modules/yt_poster.py

📁 Playlist Rules

Video Type Playlist
Vertical Shorts LCS Shorts
Widescreen Clips LCS Clips

Shorts are identified by filename suffixes like -vert or -vertical.


📋 Category & Metadata

  • categoryId: Always set to 20 (Gaming)
  • tags: Pulled from notes.json
  • description: Generated dynamically using OpenAI + branding prompt
  • title: Auto-generated from notes.json or montage info

Success Criteria

  • Upload response returns videoId
  • Resulting link is stored in the metadata archive:
    • youtube_url is appended to history JSON
  • Folder is optionally removed if DEBUG=False

🧪 Stub Testing

  • Set UPLOAD_ENABLED=False in .env to bypass real uploads
  • Simulated responses are returned for dry-run mode

Next: PeerTube Upload Logic (planned)