Merge pull request #846 from Bnyro/master

fix background service
This commit is contained in:
Bnyro 2022-07-21 17:15:35 +02:00 committed by GitHub
commit 0e4897950d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,9 @@ class BackgroundMode : Service() {
val seekToPosition = intent.getLongExtra("seekToPosition", 0L)
playOnBackgroundMode(this, videoId, seekToPosition)
} catch (e: Exception) {
try {
stopService(intent)
} catch (e: Exception) {}
}
return super.onStartCommand(intent, flags, startId)
}