Knowledge Base updated: 2026-11-03
Metrolist knowledge base
Orientation
Metrolist is an Android music client built around Jetpack Compose, Media3 playback, an InnerTube-based remote catalog, and a Room-backed local library.
The app module contains Android entry points, UI, playback services, data workflows, build flavors, and resources. Remote music data is mapped into application models before it reaches screens or playback.
Critical durable state lives in MusicDatabase and preferences; active playback state is owned by the Media3 service/session and reconciled with queues, downloads, and presentation state.
System map
flowchart TD
UI[Compose screens] --> VM[View models and workflows]
VM --> DB[MusicDatabase / Room]
VM --> IT[InnerTube client]
IT --> YTM[YouTube Music endpoints]
UI --> MS[MusicService]
MS --> M3[Media3 player and session]
M3 --> Stream[Stream URL delivery]
MS --> DL[Download service]
DL --> DB
UI --> Widgets[Widgets and companion services]
Widgets --> MS
Build[Gradle build variants] --> App[Android app module]
App --> UI
App --> MS
App --> DB
sequenceDiagram
participant Screen as Compose screen
participant VM as View model
participant Client as InnerTube client
participant Service as MusicService
participant Player as Media3 player
Screen->>VM: browse or select media
VM->>Client: request catalog data
Client-->>VM: mapped music models
Screen->>Service: play selected item
Service->>Player: set media and transport state
Glossary
- InnerTube: the request and response layer used to access YouTube Music catalog data.
- MusicService: the Android media-library service that owns Media3 playback and session interaction.
- FOSS/GMS/Izzy: distribution variants that select different platform and release integrations.
- MusicDatabase: the Room database for saved media, playlists, history, and related local state.
- Listening together: companion functionality for synchronized playback-oriented sessions.
Invariants
- Media playback is mediated by the service/session boundary rather than directly by Compose UI (
app/src/main/java/**/service/**,app/src/main/java/**/ui/**). - Durable library relationships are modeled through Room entities and DAOs (
app/src/main/java/**/database/**). - Remote catalog responses are converted before application-facing use (
app/src/main/java/**/innertube/**). - Product flavor differences are defined by Gradle configuration and variant-specific sources (
app/build.gradle*,app/src/*/). - User-visible strings remain resource-based and localized (app/…/strings.xml).
Routing table
- app/…/AndroidManifest.xml -> Application platform and composition
app/src/main/java/**/MainApplication*-> Application platform and compositionapp/src/main/java/**/MainActivity*-> Application lifecycle and integration pointsapp/src/main/java/**/receiver/**-> Application lifecycle and integration pointsapp/build.gradle*-> Android build variants and distributionapp/src/{foss,gms,izzy}/**-> Android build variants and distribution.github/workflows/**-> Android build variants and distribution- app/…/strings.xml -> Android build variants and distribution
app/src/main/java/**/innertube/**-> Music discovery and remote catalogapp/src/main/java/**/repository/**-> Music discovery and remote catalogapp/src/main/java/**/innertube/**/InnerTube*-> InnerTube client and response mappingapp/src/main/java/**/innertube/**/models/**-> InnerTube client and response mappingapp/src/main/java/**/ui/screens/search/**-> Catalog search and browse flowsapp/src/main/java/**/ui/screens/{home,explore,artist,album,playlist,podcast}/**-> Catalog search and browse flowsapp/src/main/java/**/{translation,ai}/**-> External content and AI servicesapp/src/main/java/**/service/**-> Playback systemapp/src/main/java/**/player/**-> Playback systemapp/src/main/java/**/service/MusicService*-> Media session and stream deliveryapp/src/main/java/**/player/**-> Media session and stream deliveryapp/src/main/java/**/{queue,download}/**-> Queues, downloads, and offline playbackapp/src/main/java/**/{equalizer,sleeptimer,alarm,voice}/**-> Audio controls and playback automationapp/src/main/java/**/database/**-> Local library and data managementapp/src/main/java/**/data/**-> Local library and data managementapp/src/main/java/**/database/**/{MusicDatabase*,dao/**,entities/**}-> Room persistence modelapp/src/main/java/**/{viewmodel,repository}/**-> Library, playlist, and preference workflowsapp/src/main/java/**/ui/**-> User experience and companion features- app/…/strings.xml -> User experience and companion features
app/src/main/java/**/ui/screens/**-> Compose navigation and music screensapp/src/main/java/**/ui/components/**-> Compose navigation and music screensapp/src/main/java/**/ui/**/player/**-> Player presentation and interactionapp/src/main/java/**/{widget,lyrics,recognition,discord,listeningtogether}/**-> Widgets, lyrics, recognition, and listening together