Fixed Last track of queue playing again when gapless playback is on

This commit is contained in:
Prathamesh More 2022-08-31 23:41:31 +05:30
parent 9dc8d55897
commit 644640c14f
2 changed files with 2 additions and 1 deletions

View file

@ -697,6 +697,7 @@ class MusicService : MediaBrowserServiceCompat(),
override fun onTrackWentToNext() { override fun onTrackWentToNext() {
if (pendingQuit || repeatMode == REPEAT_MODE_NONE && isLastTrack) { if (pendingQuit || repeatMode == REPEAT_MODE_NONE && isLastTrack) {
playbackManager.setNextDataSource(null)
pause(false) pause(false)
seek(0) seek(0)
if (pendingQuit) { if (pendingQuit) {

View file

@ -88,7 +88,7 @@ class PlaybackManager(val context: Context) {
playback?.setDataSource(song, force, completion) playback?.setDataSource(song, force, completion)
} }
fun setNextDataSource(trackUri: String) { fun setNextDataSource(trackUri: String?) {
playback?.setNextDataSource(trackUri) playback?.setNextDataSource(trackUri)
} }