$ show deniscerri/ytdlnis
YTDLnis is a feature-rich Android application that serves as a graphical frontend for yt-dlp, enabling users to download video and audio from over 1000 websites. The app follows the MVVM architecture with Room database for local persistence, WorkManager for background download tasks, and a repository pattern for data access. It provides a comprehensive download management system including queue management, scheduling, format selection, metadata embedding, chapter splitting, SponsorBlock integration, and support for custom yt-dlp commands. The application also includes a built-in terminal emulator for advanced users, cookie management, YouTube PoToken generation, and an observe-sources feature for monitoring channels or playlists for new content. The codebase is well-organized into UI fragments, viewmodels, repositories, and utility classes, with extensive use of Kotlin coroutines and Android Jetpack components. While the app is actively maintained and demonstrates solid engineering practices, some modules like UiUtil.kt are monolithic and tightly coupled, and the heavy reliance on external tools (yt-dlp, FFmpeg, Python) introduces ongoing maintenance risks.
The LLM identified 5 files worth highlighting for reuse:
Abstract base class for managing external runtime packages (FFmpeg, Python, NodeJS, Deno, Aria2c, QuickJS). Provides a consistent interface for downloading, installing, and updating packages from GitHub releases. Demonstrates a clean plugin architecture that can be extended to support additional tools with minimal code changes.
Utility for parsing the stdout/stderr output of yt-dlp processes in real-time. Extracts progress information, format data, and error messages using regex patterns. This component is self-contained and could be reused in any project that needs to monitor and parse streaming process output.
Utility class for sorting, filtering, and applying user preferences to media formats. Handles complex logic for codec selection, quality prioritization, and format ordering. The pattern of separating format processing from UI is reusable for any application that needs to present and select media formats.
Handles full backup and restore of app data including downloads, history, cookies, command templates, and observe sources. Uses Gson for JSON serialization and supports selective restore. This pattern is reusable for any Android app needing a comprehensive backup/restore system.
Generates YouTube PoTokens for bypassing restrictions by executing JavaScript in a WebView. Demonstrates a non-obvious technique for extracting authentication tokens from YouTube's botguard system. While specific to YouTube, the pattern of using WebView to execute client-side challenges is reusable for other services.