diff --git a/lib/services/audio_player/mk_state_player.dart b/lib/services/audio_player/mk_state_player.dart index 053cd89fc..5eb16e01d 100644 --- a/lib/services/audio_player/mk_state_player.dart +++ b/lib/services/audio_player/mk_state_player.dart @@ -128,6 +128,7 @@ class MkPlayerWithState extends Player { _playlist = null; _tempMedias = null; _playerStateStream.add(AudioPlaybackState.stopped); + _shuffleStream.add(false); } @override @@ -242,6 +243,12 @@ class MkPlayerWithState extends Player { play: true, ); } + + // replace in the _tempMedias if it's not null + if (shuffled && _tempMedias != null) { + final tempIndex = _tempMedias!.indexOf(media); + _tempMedias![tempIndex] = Media(newUrl, extras: media.extras); + } break; } }