Merge pull request #2975 from praveenrajput/master

Crash fix on playlist background playback
This commit is contained in:
Bnyro 2023-02-05 20:54:48 +01:00 committed by GitHub
commit c75f1dcb85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,12 +57,7 @@ class PlaylistOptionsBottomSheet(
// play the playlist in the background // play the playlist in the background
getString(R.string.playOnBackground) -> { getString(R.string.playOnBackground) -> {
runBlocking { runBlocking {
val playlist = val playlist = PlaylistsHelper.getPlaylist(playlistId)
if (playlistType == PlaylistType.PRIVATE) {
RetrofitInstance.authApi.getPlaylist(playlistId)
} else {
RetrofitInstance.api.getPlaylist(playlistId)
}
BackgroundHelper.playOnBackground( BackgroundHelper.playOnBackground(
context = requireContext(), context = requireContext(),
videoId = playlist.relatedStreams[0].url!!.toID(), videoId = playlist.relatedStreams[0].url!!.toID(),