How jellyfin/jellyfin-androidtv works
Main Components
a. Core Application Layer:
• Application (JellyfinApplication.kt)
• Authentication System
• UI/Presentation Layer
• Playback System
• Preferences Management
b. External Integrations:
• Jellyfin Server API
• Media3/ExoPlayer
• Android TV Framework
• Content Providers
Architectural Patterns to Highlight
• MVVM Architecture (ViewModels present in UI components)
• Repository Pattern (visible in auth/repository and data/repository)
• Plugin Architecture (especially for playback)
• Dependency Injection (using Koin, visible in di/ directory)
Key Components Breakdown
Frontend (UI Layer):
[Android TV Leanback Framework]
• ↓
[UI Components]
• Browsing
• Playback
• Search
• Preferences
• Home Screen
Core Services:
[Authentication] [Playback] [Preferences]
• ↓ ↓ ↓
[Repositories] → [Services] ← [Data Stores]
Playback System:
[Playback Manager]
• ↓
[Media Backends] → [Stream Resolvers]
• ↓
[ExoPlayer/Media3]
Implementation Details
• Component Name |
• Key Responsibilities |
• Main Classes |
• Dependencies |
Data Flow Indicators
• User interaction flow
• Authentication flow
• Media playback flow
• Data synchronization
• API communications
External Services
• Component types
• Special indicators
This system design should emphasize the TV-centric nature of the application while showing how it integrates with the Jellyfin ecosystem. The modular nature of the playback system and the authentication framework should be prominently featured as they are core to the application's functionality.