Skip to content

Fix/crossfade player state#2809

Merged
mostafaalagamy merged 2 commits intoMetrolistGroup:mainfrom
adrielGGmotion:fix/crossfade-player-state
Feb 14, 2026
Merged

Fix/crossfade player state#2809
mostafaalagamy merged 2 commits intoMetrolistGroup:mainfrom
adrielGGmotion:fix/crossfade-player-state

Conversation

@adrielGGmotion
Copy link
Contributor

Summary

This PR fixes critical bugs where Repeat Mode and Shuffle settings were being ignored or reset, particularly when Crossfade was enabled (or even present in the codebase).

Changes

  • Fix State Desync: Prevented restorePlayerState from overwriting authoritative DataStore settings with stale internal player state during app startup.
  • Fix Crossfade Initialization: startCrossfade now reads settings directly from DataStore to ensure the new secondary player is initialized with the correct Repeat/Shuffle modes.
  • Enforce Repeat Logic: Added safeguards in onMediaItemTransition and onPlaybackStateChanged to strictly enforce REPEAT_MODE_ONE (loop song) and REPEAT_MODE_ALL (loop queue) behavior, correcting the player if it attempts to auto-advance incorrectly.

Fixes

Fixes #2751

maximillions-dev and others added 2 commits February 13, 2026 21:23
This fixes issues where Repeat Mode (One/All) and Shuffle were being reset or ignored, particularly when Crossfade was involved.

- Prevent restorePlayerState from overwriting authoritative DataStore settings on startup

- Initialize secondary crossfade player using DataStore settings

- Add safety checks to enforce Repeat One/All behavior during transitions
@mostafaalagamy mostafaalagamy merged commit 046c38e into MetrolistGroup:main Feb 14, 2026
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.

repeat doesn't work

3 participants