mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fix autoplay crash
This commit is contained in:
parent
077d5728fa
commit
71fcfc075f
@ -17,6 +17,7 @@ class AutoPlayHelper(
|
|||||||
val index = playlistStreamIds.indexOf(currentVideoId)
|
val index = playlistStreamIds.indexOf(currentVideoId)
|
||||||
// check whether there's a next video
|
// check whether there's a next video
|
||||||
return if (index + 1 < playlistStreamIds.size) playlistStreamIds[index + 1]
|
return if (index + 1 < playlistStreamIds.size) playlistStreamIds[index + 1]
|
||||||
|
else if (playlistNextPage == null) null
|
||||||
else getNextPlaylistVideoId(currentVideoId)
|
else getNextPlaylistVideoId(currentVideoId)
|
||||||
} else if (playlistStreamIds.isEmpty() || playlistNextPage != null) {
|
} else if (playlistStreamIds.isEmpty() || playlistNextPage != null) {
|
||||||
// fetch the next page of the playlist
|
// fetch the next page of the playlist
|
||||||
|
Loading…
x
Reference in New Issue
Block a user