Files
jellyfin-audio-player/patches/@weights-ai__react-native-track-player.patch
Lei Nelissen af3c807d5a feat: upgrade to react native 0.79
This was necessary because we had to use the newest iOS SDK, which had an issue with react-native, which was only fixed with the newest versions.

The move to new architecture has been hellish, but all appears to work. It requires more patches, and it shows which packages are currently maintained poorly. This goes especially for react-native-track-player. We're using a fork right now, but in order to make that work, we had to switch to pnpm.
2025-05-06 11:11:49 +02:00

25 lines
982 B
Diff

diff --git a/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt b/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt
index baeebce2489e6f9e47ce2ebb9332072e31ba24d5..e52a053d99fcc568d03a0294840b0463f04d01c9 100644
--- a/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt
+++ b/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt
@@ -756,10 +756,15 @@ class MusicService : HeadlessJsTaskService() {
return HeadlessJsTaskConfig(TASK_KEY, Arguments.createMap(), 0, true)
}
- // @MainThread
- // fun onBind(intent: Intent?): IBinder {
- // return binder
- // }
+ @MainThread
+ override fun onBind(intent: Intent): IBinder {
+ return binder
+ }
+
+ @MainThread
+ override fun onUnbind(intent: Intent): Boolean {
+ return super.onUnbind(intent)
+ }
@MainThread
override fun onTaskRemoved(rootIntent: Intent?) {