mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
Fix the queue order in the background player mode
This commit is contained in:
parent
1140c34d4d
commit
a21b8715b3
@ -177,12 +177,14 @@ class BackgroundMode : Service() {
|
|||||||
RetrofitInstance.api.getStreams(videoId)
|
RetrofitInstance.api.getStreams(videoId)
|
||||||
}.getOrNull() ?: return@launch
|
}.getOrNull() ?: return@launch
|
||||||
|
|
||||||
// add the playlist video to the queue
|
// save the current stream to the queue
|
||||||
if (PlayingQueue.isEmpty() && !keepQueue) updateQueue()
|
|
||||||
streams?.toStreamItem(videoId)?.let {
|
streams?.toStreamItem(videoId)?.let {
|
||||||
PlayingQueue.updateCurrent(it)
|
PlayingQueue.updateCurrent(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add the playlist video to the queue
|
||||||
|
if (PlayingQueue.isEmpty() && !keepQueue) updateQueue()
|
||||||
|
|
||||||
handler.post {
|
handler.post {
|
||||||
playAudio(seekToPosition)
|
playAudio(seekToPosition)
|
||||||
}
|
}
|
||||||
|
@ -472,7 +472,8 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
|||||||
videoId!!,
|
videoId!!,
|
||||||
exoPlayer.currentPosition,
|
exoPlayer.currentPosition,
|
||||||
playlistId,
|
playlistId,
|
||||||
channelId
|
channelId,
|
||||||
|
true
|
||||||
)
|
)
|
||||||
handler.postDelayed({
|
handler.postDelayed({
|
||||||
(activity as MainActivity).navController.navigate(R.id.audioPlayerFragment)
|
(activity as MainActivity).navController.navigate(R.id.audioPlayerFragment)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user