How donteatoreo/dis works
Main Components
• CLI/Command Interface: Represented by Program.cs, RootCommand.cs, and ServiceCollectionExtensions.cs. This is the entry point handling arguments, initialization, and configuration.
• Download Module: Under the Features/Download directory, this module contains classes such as GenericDownloader, VideoDownloaderBase, VideoDownloaderFactory, and YouTubeDownloader along with related models and interfaces (for instance, IDownloader, IDownloaderFactory, IVideoDownloader). This module facilitates obtaining video content from various online sources.
• Conversion Module: Found under the Features/Conversion directory. It includes components like Converter, CodecParser, ProcessHandler, and StreamConfigurator, together with supporting models (for valid resolutions, video codecs, etc.). This module is responsible for invoking and coordinating FFmpeg processes to compress and convert video files.
• TrimSlider Module: Represented by the Features/TrimSlider directory. It contains classes for handling slider state, parsing times, and managing trimming operations, which is especially significant given the tool’s TUI mode for video trimming.
• Common Utilities: Features/Common houses shared files like Globals.cs, Settings.cs, and TrimSettings.cs that are used across modules.
• Infrastructure/Dependency Management: Features/Infrastructure (with components like TypeRegistrar and TypeResolver) that help with dependency injection or service resolution across the application.
Data Flow and Components’ Interactions
– If the user input is a URL (or an online source), the Download module is activated. A label can indicate “Download: Obtain video using yt-dlp.”
• Common Utilities block is visually connected to all these components (Conversion, Download, TrimSlider) since they rely on shared settings and global configurations.
• The Infrastructure component (TypeRegistrar/TypeResolver) should be connected to the CLI and each module to represent dependency injection.