mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
fix: shuffle not working (#562)
This commit is contained in:
parent
0089d471ae
commit
dc76634a6e
@ -128,6 +128,7 @@ class MkPlayerWithState extends Player {
|
|||||||
_playlist = null;
|
_playlist = null;
|
||||||
_tempMedias = null;
|
_tempMedias = null;
|
||||||
_playerStateStream.add(AudioPlaybackState.stopped);
|
_playerStateStream.add(AudioPlaybackState.stopped);
|
||||||
|
_shuffleStream.add(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -242,6 +243,12 @@ class MkPlayerWithState extends Player {
|
|||||||
play: true,
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user