Skip to content

feat(playback): add option to cache songs after playback starts#3034

Draft
kairosci wants to merge 2 commits intoMetrolistGroup:mainfrom
kairosci:feature/cache-after-playback
Draft

feat(playback): add option to cache songs after playback starts#3034
kairosci wants to merge 2 commits intoMetrolistGroup:mainfrom
kairosci:feature/cache-after-playback

Conversation

@kairosci
Copy link
Contributor

@kairosci kairosci commented Feb 25, 2026

Problem

Users may want to control when songs are cached during playback. Accidentally started songs can fill up the cache.

Solution

  • Added CacheAfterSecondsKey preference in PreferenceKeys.kt
  • Added cache control logic in MusicService.kt with cacheEnabledMediaIds set
  • Added UI in StorageSettings.kt with slider for selecting delay (0%, 25%, 50%, 75%, 90%)
  • Added strings in metrolist_strings.xml

Songs are now cached at the selected percentage of playback (default 75%).

Testing

Built and tested the cache option in Storage Settings

Closes #3033

@kairosci kairosci marked this pull request as draft February 25, 2026 19:24
@kairosci kairosci closed this Feb 25, 2026
@kairosci kairosci reopened this Feb 25, 2026
@kairosci kairosci force-pushed the feature/cache-after-playback branch from b845624 to e3fffb4 Compare February 25, 2026 19:41
@kairosci kairosci marked this pull request as ready for review February 25, 2026 22:51
@kairosci kairosci marked this pull request as draft February 25, 2026 23:02
@kairosci kairosci force-pushed the feature/cache-after-playback branch 3 times, most recently from 255eb19 to c06490f Compare February 25, 2026 23:09
@kairosci kairosci changed the title feat(playback): cache songs after playback starts feat(playback): add option to cache songs after playback starts Feb 25, 2026
@kairosci kairosci force-pushed the feature/cache-after-playback branch 5 times, most recently from 6968698 to 52147a2 Compare February 26, 2026 11:51
@kairosci kairosci force-pushed the feature/cache-after-playback branch from 52147a2 to 2156f71 Compare February 26, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cache tracks only after a minimum listening time instead of at playback start

1 participant