How bogdanbto/youtubeplaylistdownloader works
Project type and purpose
• This is a desktop full-stack application (WPF/.NET) whose sole purpose is to download YouTube videos, playlists, or channels, convert them to various formats, tag them automatically, and keep itself up to date.
File structure
• Top-level folders and files:
• YoutubePlaylistDownloader/ – contains the entire WPF application
• YPDSetup/ – Inno Setup installer scripts
• README.md, LICENSE, solution (.sln), project (.csproj)
• Inside YoutubePlaylistDownloader/:
• XAML views (MainPage.xaml, DownloadPage.xaml, About.xaml, Settings.xaml, etc.)
• Code-behind (.xaml.cs) for each view
• Objects/ – domain models (DownloadSettings, FullPlaylist, QueuedDownload, etc.)
• Utilities/ – helper classes (YoutubeHelpers, ExtensionMethods)
• appsettings.json & config files – version info, update URLs
• No external database; data persistence relies on local settings and file system.
README
• Confirms it’s open-source, ad-free, multi-format conversion, theming, multi-language support, and has an auto-update mechanism.
a. Main components
1. User Interface Layer (WPF XAML + code-behind)
2. ViewModel/Controller Layer (DownloadPageController, SettingsController patterns implied in code-behind)
3. Core Download Engine (Objects classes + Utilities.YoutubeHelpers)
4. Conversion Module (FFmpeg or internal converter invoked by VideoQualityConverter)
5. Update Service (checks latestVersion*.txt & installer URLs)
6. Persistence & Configuration (appsettings.json, Settings.settings, local file writes)
7. External Services
– YouTube web endpoints / APIs
– GitHub releases (for update checks)
b. Relationships & interactions
– UI → ViewModel/Controller: user triggers “Download” or “Settings”
– Controller → Download Engine: enqueues download tasks (QueuedDownload, FixedQueue)
– Download Engine ↔ YouTube API: fetches video/playlist metadata and streams (ProgressStream)
– Download Engine → Conversion Module: post-processing to convert format & apply tags
– Engine/Converter → File System: writes video files to user’s directory
– Update Service → GitHub Releases endpoint: polls for new version, triggers YPDSetup installer
c. Architectural patterns
– MVVM-style division (Views in XAML, code-behind acting as ViewModels/controllers)
– Producer-consumer queue (FixedQueue & QueuedDownload) for parallel downloads
– Helper/util classes isolate platform-specific API calls (YoutubeHelpers)
– Resource bundles for multi-language support (Languages/*.xaml)
d. Key technologies & frameworks
– .NET 6+ (C#) with WPF
– XAML for UI and theming
– Inno Setup for installer (YPDSetup)
– JSON & .config for settings and versioning
– Potential FFmpeg integration (invoked via VideoQualityConverter)