Skip to content

Commit

Permalink
Fix crash when repeatedly starting offline background player
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Jun 14, 2023
1 parent ea9332f commit 75e0c6a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand Down

0 comments on commit 75e0c6a

Please sign in to comment.