Merge pull request #4004 from Bnyro/master

Fix crash when repeatedly starting offline background player
This commit is contained in:
Bnyro 2023-06-14 09:18:01 +02:00 committed by GitHub
commit 293e6bb5d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 -> {