From 2f83327a3cdb8d1032092850db3046eb44c2a12b Mon Sep 17 00:00:00 2001 From: Praveen Rajput Date: Mon, 6 Feb 2023 01:08:35 +0530 Subject: [PATCH] :bug: Fixes crash on playlist background playback - Fixes #2965 --- .../libretube/ui/sheets/PlaylistOptionsBottomSheet.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/sheets/PlaylistOptionsBottomSheet.kt b/app/src/main/java/com/github/libretube/ui/sheets/PlaylistOptionsBottomSheet.kt index dad4f0d74..f652a9246 100644 --- a/app/src/main/java/com/github/libretube/ui/sheets/PlaylistOptionsBottomSheet.kt +++ b/app/src/main/java/com/github/libretube/ui/sheets/PlaylistOptionsBottomSheet.kt @@ -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(),