feat(playback): pause on volume zero + OOM fix for large Telegram channels#2415
Open
Amonoman wants to merge 4 commits into
Open
feat(playback): pause on volume zero + OOM fix for large Telegram channels#2415Amonoman wants to merge 4 commits into
Amonoman wants to merge 4 commits into
Conversation
- Add PAUSE_ON_VOLUME_ZERO DataStore key + flow + setter to UserPreferencesRepository - Collect pref in MusicService and pause playback when volume hits 0 - ReplayGain programmatic volume adjustments are unaffected - Add Python script to inject localized strings into all 12 locale files - Add ContentObserver on Settings.System.CONTENT_URI to detect hardware volume key changes and pause when media stream reaches 0 - Registers observer in onCreate, unregisters in onDestroy
- Add Volume subsection with SwitchSettingItem to SettingsCategoryScreen - Add pauseOnVolumeZero field to SettingsUiState - Add pauseOnVolumeZeroFlow to SettingsViewModel combine() block - Add setPauseOnVolumeZero() setter in SettingsViewModel - Inject settings_volume_section, settings_pause_on_volume_zero and _desc into strings_settings.xml for all 12 locales - Remove duplicate keys from strings.xml (AAPT2 duplicate resources fix) - Fix rogue spaces in Korean strings_settings.xml entries
daedaevibin
added a commit
to Veridian-Zenith/PixelPlayer
that referenced
this pull request
Jun 20, 2026
Processing all songs in a single pass exhausted the 256 MB heap on devices with large Telegram channels (reproduced at 65k songs, PixelPlayerHQ#2172). Songs are now processed and flushed to Room in batches of 500, keeping peak memory bounded regardless of channel size. - Album songCounts accumulated across all chunks; every chunk re-upserts albums it touches so the final count is always correct - Deletion diff runs after all chunks using the complete synced ID set - Deletions batched in 500s to respect SQLite variable limits - Remove duplicate getAllArtistsListRaw() call (was called twice) Co-authored-by: Claude <claude@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Pause when volume reaches zero
PAUSE_ON_VOLUME_ZERODataStore preference toUserPreferencesRepositoryContentObserveronSettings.System.CONTENT_URIto detect hardware volume key changesSettingsCategoryScreenpauseOnVolumeZerointoSettingsViewModeluiState and settersettings_volume_section,settings_pause_on_volume_zeroand_descintostrings_settings.xmlfor all 12 locales (ar, de, es, fr, in, it, ko, nb, ru, tr, zh-rCN)OOM fix for large Telegram channels
getAllArtistsListRaw()call (was called twice)Fixes #2172