🐛 Fixes crash on playlist background playback

- Fixes #2965
This commit is contained in:
Praveen Rajput 2023-02-06 01:08:35 +05:30
parent cb88ae9eea
commit 2f83327a3c

View File

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