mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Fix crash when repeatedly starting offline background player
This commit is contained in:
parent
ea9332f873
commit
75e0c6a166
@ -35,6 +35,7 @@ class DownloadOptionsBottomSheet(
|
|||||||
0 -> {
|
0 -> {
|
||||||
val playerIntent = Intent(requireContext(), OfflinePlayerService::class.java)
|
val playerIntent = Intent(requireContext(), OfflinePlayerService::class.java)
|
||||||
.putExtra(IntentData.videoId, download.videoId)
|
.putExtra(IntentData.videoId, download.videoId)
|
||||||
|
context?.stopService(playerIntent)
|
||||||
ContextCompat.startForegroundService(requireContext(), playerIntent)
|
ContextCompat.startForegroundService(requireContext(), playerIntent)
|
||||||
}
|
}
|
||||||
1 -> {
|
1 -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user