How jumblebumble/customtv works
Project type and purpose
• This is a Unity-based game mod (CustomTV) built as a Melon Loader plugin for the game “Schedule I.”
• Its purpose is to hijack in-game “TV” objects and play local MP4s or YouTube videos via Unity’s VideoPlayer.
File structure
• Top‐level:
• CustomTV.csproj / CustomTV.sln → C# project/solution
• MainMod.cs → mod entry point
• Utils/ → shared helpers (state, extensions, comparers, video metadata)
• Utils/YoutubeUtils/ → YouTube-specific download and UI code
• No separate “frontend” or “backend” folders – it’s a single plugin assembly loaded into the game.
• Configuration is handled via MelonPreferences.cfg (no custom config file in repo).
• External dependency: yt-dlp executable called at runtime to fetch YouTube videos.
README for additional insights
• Hooks into Melon Loader and Unity VideoPlayer.
• Manages shuffle/sort logic (SmartEpisodeComparer).
• Caches downloaded YouTube videos on disk (max #, auto-cleanup).
• Responds to hotkeys (Ctrl+Shift + key) to control playback and trigger downloads.
Detail
• Config as a distinct component (MelonPreferences.cfg) showing read/write interactions.
• Cleanup logic: on exit or cache overflow → FileManager/YouTubeManager delete old files.