How alexch33/super-video-downloader works
1. What this app is
- This is a native Android video/audio downloader centered around a built-in browser, video detection, offline playback, and several downloader engines.
- The codebase is Kotlin-first, uses Android Views + DataBinding, and is organized around MVVM with repositories.
2. Top-level app flow
- DLApplication boots the dependency graph and shared services.
- The user typically enters through SplashActivity, then MainActivity.
- From there the app navigates between browser/home, video details, downloads/progress, history, bookmarks, proxies, settings, help, and the player screens.
3. UI layer boundaries
- The presentation layer is split into Activities and Fragments under ui/main/*.
- home/browser is the most complex UI subtree: it hosts tabs, a WebView-based browser, and the detected-videos panel.
- Each major screen has a paired ViewModel, and common base classes (BaseActivity, BaseFragment, BaseViewModel) provide shared lifecycle and state handling.
4. Browser and web-content subsystem
- The browser is implemented with custom WebView clients/chrome clients and a tab system (WebTab, WebTabFactory, CustomViewPager2).
- This layer is responsible for page navigation, tab management, page state, and capturing browser events that indicate media availability.
- Browser-related state feeds into history/bookmarks/top pages and into video detection.
5. Video detection and extraction
- Detected media is modeled separately from the browser UI via detectedVideos/*.
- The app maintains a global detection model and detector interface so multiple pages/tabs can contribute candidate media entries.
- Once media is detected, it is surfaced in the UI as selectable candidates and moved into the download/playback flows.
6. Download engine subsystem
- Downloading is not a single implementation; it is split into multiple engines:
- generic_downloader for task-based downloads
- custom_downloader for regular/file-oriented downloads
- super_x_downloader for segmented HLS/DASH/live-stream handling
- youtubedl_downloader for youtube-dl style extraction/downloads
- The super_x_downloader subtree includes dedicated strategies for HLS, DASH/MPD, and live variants, which is the main architecture for advanced stream types.
7. Background execution and user feedback
- Downloader workers (*Worker) indicate background job execution, likely via Android WorkManager.
- Progress is persisted and shown in the progress screen, while notifications are handled through NotificationsHelper and downloader notification receivers.
- This gives the app a clear split between foreground selection/UI and background transfer execution.
8. Local persistence
- Persistent app state is backed by Room under data/local/room.
- Separate entities/DAOs handle videos, progress, history, config, and supported pages.
- The Room schemas checked into app/schemas show that the database is versioned and migrated over time, which is important for long-term state compatibility.
9. Remote data and app configuration
- data/remote contains services and data sources for configuration and supported pages.
- The app likely refreshes site support, top pages, and related metadata from remote endpoints instead of hardcoding all supported sources.
- ConfigRepository, TopPagesRepository, and VideoRepository bridge these remote sources into the rest of the app.
10. Networking, proxying, and privacy
- The app has a dedicated proxy subsystem under util/proxy_utils plus v2ray/V2Ray.kt.
- Traffic can be routed through configurable proxies, with retry/interception support and support for encrypted DNS as described in the README.
- This matters architecturally because browser traffic, extractor traffic, and download traffic may all need to flow through the proxy layer.
11. Shared utilities and media processing
- Utilities cover cookies, file handling, intents, notifications, favicon handling, time/memory helpers, and video-specific helpers.
- FfmpegProcessor and playlist parsers (hls_parser) support media-processing tasks that are adjacent to download/extraction.
- These utilities are not a separate subsystem, but they are key dependencies for the downloader and browser flows.
12. Dependency injection and composition
- Dagger 2 is used to assemble the app graph through AppComponent and modules for database, network, repositories, view models, workers, and utilities.
- Custom qualifiers distinguish application vs activity context and local vs remote data sources.
- This is the main boundary that wires UI, repositories, network clients, and storage together.
13. Build and packaging tooling
- The project is an Android Gradle build with Kotlin DSL.
- There is a small Go-based builder under app/src/main/go/builder, and the README exposes a task for vendoring Go dependencies.
- Fastlane metadata, GitHub/GitLab CI, and schema snapshots indicate the app is actively packaged and release-managed across platforms.
14. Important architectural takeaway
- The app’s core data flow is: browser/WebView activity → media detection → candidate selection → repository-backed download task → background worker/downloader engine → progress/notification updates → persisted history/download state.
- The main architectural boundaries are UI, repositories, local/remote data sources, network/proxy infrastructure, and specialized downloader engines.
Main entry points: VideoFragment.kt Video screen · ProgressFragment.kt Progress · BrowserFragment.kt Browser · VideoRepository.kt Repositories
Components 23
App shell
Application bootstrap and screen navigation
- DLApplication · Initializes dependency graph and shared services
app/src/main/java/com/myAllVideoBrowser/DLApplication.kt - Splash · Entry activity before main UI
app/src/main/java/com/myAllVideoBrowser/ui/main/splash/SplashActivity.kt - Main activity · Hosts the primary navigation and fragments
app/src/main/java/com/myAllVideoBrowser/ui/main/home/MainActivity.kt - Main VM · Coordinates top-level home state
app/src/main/java/com/myAllVideoBrowser/ui/main/home/MainViewModel.kt
Browser + media
WebView browsing, tab management, and video detection
- Browser · Main browser container and navigation surface
app/src/main/java/com/myAllVideoBrowser/ui/main/home/browser/BrowserFragment.kt - Web tab · Represents a browser tab and its state
app/src/main/java/com/myAllVideoBrowser/ui/main/home/browser/webTab/WebTab.kt - Tab factory · Creates web tab instances
app/src/main/java/com/myAllVideoBrowser/ui/main/home/browser/webTab/WebTabFactory.kt - Web clients · Custom chrome and page clients for browser events
app/src/main/java/com/myAllVideoBrowser/ui/main/home/browser/CustomWebViewClient.kt - Video detect · Collects detected media candidates across tabs
app/src/main/java/com/myAllVideoBrowser/ui/main/home/browser/detectedVideos/GlobalVideoDetectionModel.kt - Video screen · Shows detected videos and selection details
app/src/main/java/com/myAllVideoBrowser/ui/main/video/VideoFragment.kt - Player · Offline playback and media viewing
app/src/main/java/com/myAllVideoBrowser/ui/main/player/VideoPlayerActivity.kt
Download engines
Background transfer execution and media processing
- Progress · Displays download and transfer progress
app/src/main/java/com/myAllVideoBrowser/ui/main/progress/ProgressFragment.kt - Generic DL · Task-oriented downloader engine
app/src/main/java/com/myAllVideoBrowser/util/downloaders/generic_downloader/GenericDownloader.kt - Custom DL · Regular file and direct download engine
app/src/main/java/com/myAllVideoBrowser/util/downloaders/custom_downloader/CustomRegularDownloader.kt - SuperX · Segmented HLS/DASH/live download engine
app/src/main/java/com/myAllVideoBrowser/util/downloaders/super_x_downloader/SuperXDownloader.kt - YTDL · youtube-dl style extraction and download path
app/src/main/java/com/myAllVideoBrowser/util/downloaders/youtubedl_downloader/YoutubeDlDownloader.kt
Data layer
Local storage, remote services, and repositories
- Room DB · Persisted app state and schemas
app/src/main/java/com/myAllVideoBrowser/data/local/room/AppDatabase.kt - Repositories · Bridges UI to local and remote sources
app/src/main/java/com/myAllVideoBrowser/data/repository/VideoRepository.kt - Remote API · Configuration, search, and video services
app/src/main/java/com/myAllVideoBrowser/data/remote/service/VideoService.kt - Local sources · Local data sources and Room-backed DAOs
app/src/main/java/com/myAllVideoBrowser/data/local/VideoLocalDataSource.kt
Infrastructure
Dependency injection, proxying, and shared utilities
- Dagger graph · App component and modules wiring dependencies
app/src/main/java/com/myAllVideoBrowser/di/component/AppComponent.kt - Proxy layer · Proxy controller, OkHttp proxying, and V2Ray support
app/src/main/java/com/myAllVideoBrowser/util/proxy_utils/CustomProxyController.kt - Utilities · Cookies, files, notifications, media processing, and parsers
app/src/main/java/com/myAllVideoBrowser/util/AppUtil.kt
Connections 28
- DLApplication → Dagger graph: builds · Application creates the dependency graph
- DLApplication → Splash: starts · Boot flow enters the splash activity
- Splash → Main activity: opens · Splash hands off to the main shell
- Main activity → Browser: hosts · Main activity displays the browser hub
- Main activity → Progress: navigates · Main shell can show download progress
- Browser → Web tab: manages · Browser coordinates multiple tab runtimes
- Browser → Tab factory: creates · Tabs are instantiated through a factory
- Browser → Web clients: observes · Web clients capture page and media events
- Web clients → Video detect: feeds · Browser events populate media candidates
- Video detect → Video screen: surfaces · Detected media is shown for selection
- Video screen → Repositories: requests · Selection moves into repository-backed tasks
- Repositories → Local sources: reads/writes · Repositories persist and query local state
- Repositories → Remote API: fetches · Repositories refresh remote metadata and support data
- Repositories → Room DB: stores · Local state is backed by Room
- Video screen → Generic DL: starts · Selected media can use task-based download
- Video screen → Custom DL: starts · Direct file downloads go through the custom engine
- Video screen → SuperX: starts · Segmented streams use the advanced engine
- Video screen → YTDL: starts · Extractor-driven sources use youtube-dl path
- Generic DL → Progress: reports · Background jobs update progress UI
- Custom DL → Progress: reports · File downloads update progress UI
- SuperX → Progress: reports · Stream segment downloads update progress UI
- YTDL → Progress: reports · Extractor downloads update progress UI
- Generic DL → Proxy layer: routes through · Download traffic can be proxied
- SuperX → Utilities: uses · Stream handling relies on parsers and media helpers
- Proxy layer → Utilities: uses · Proxy stack relies on shared networking helpers
- Dagger graph → Remote API: provides · DI wires network services
- Dagger graph → Room DB: provides · DI wires database and DAOs
- Dagger graph → Utilities: provides · DI wires helpers, workers, and factories