Fix crash when repeatedly starting offline background player

This commit is contained in:
Bnyro 2023-06-14 09:18:14 +02:00
parent ea9332f873
commit 75e0c6a166

View File

@ -35,6 +35,7 @@ class DownloadOptionsBottomSheet(
0 -> {
val playerIntent = Intent(requireContext(), OfflinePlayerService::class.java)
.putExtra(IntentData.videoId, download.videoId)
context?.stopService(playerIntent)
ContextCompat.startForegroundService(requireContext(), playerIntent)
}
1 -> {