fix autoplay crash

This commit is contained in:
Bnyro 2022-08-08 11:29:38 +02:00
parent 077d5728fa
commit 71fcfc075f

View File

@ -17,6 +17,7 @@ class AutoPlayHelper(
val index = playlistStreamIds.indexOf(currentVideoId)
// check whether there's a next video
return if (index + 1 < playlistStreamIds.size) playlistStreamIds[index + 1]
else if (playlistNextPage == null) null
else getNextPlaylistVideoId(currentVideoId)
} else if (playlistStreamIds.isEmpty() || playlistNextPage != null) {
// fetch the next page of the playlist