$ account EgalitarianMonkey
HomeTube is a Streamlit-based web application for downloading and managing media from YouTube and 1800+ other platforms via yt-dlp. It provides a rich UI for URL analysis, quality profile selection (AV1/VP9/H.264), subtitle embedding, video cutting (keyframe/precise), SponsorBlock ad removal, and playlist synchronization with full diff-based state management. The architecture is a monolithic Streamlit app with heavy subprocess orchestration of yt-dlp and ffmpeg, backed by a typed configuration system, JSON-based workspace state files, and a comprehensive test suite with mocked Streamlit dependencies. Designed for homelab deployment, it includes Docker multi-arch builds, Nginx reverse proxy config, and daily automated rebuilds to stay current with yt-dlp updates. Core data flows: URLs are analyzed via yt-dlp (with client fallback chain default → ios → web), metadata is cached in url_info.json, download strategies are computed using format profile matching (codec priorities, audio language detection), and final files are moved to a configurable destination with optional hardlinking. Playlists are handled via a dedicated sync module that computes rename/archive/delete plans and applies them with dry-run support. The system emphasizes resilience through generic file naming, temporary workspace preservation, and intelligent caching that refuses to overwrite premium AV1/VP9 metadata with lower-quality data. The application is not a data research project; it is a production-ready media downloader and manager with no ML or analytical components. Its complexity lies in data integrity patterns (metadata caching, state machines, filesystem mutations) rather than data science.