Skip to content

Commit

Permalink
Make playbackController reference optional in ReportingHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Dec 5, 2024
1 parent b600484 commit f37036f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ReportingHelper(
) {
fun reportStart(
lifecycleOwner: LifecycleOwner,
playbackController: PlaybackController,
playbackController: PlaybackController?,
item: BaseItemDto,
streamInfo: StreamInfo,
position: Long,
Expand All @@ -43,8 +43,8 @@ class ReportingHelper(
PlayMethod.DirectStream -> org.jellyfin.sdk.model.api.PlayMethod.DIRECT_STREAM
PlayMethod.DirectPlay -> org.jellyfin.sdk.model.api.PlayMethod.DIRECT_PLAY
},
audioStreamIndex = playbackController.audioStreamIndex,
subtitleStreamIndex = playbackController.subtitleStreamIndex,
audioStreamIndex = playbackController?.audioStreamIndex,
subtitleStreamIndex = playbackController?.subtitleStreamIndex,
isMuted = false,
repeatMode = RepeatMode.REPEAT_NONE,
playbackOrder = PlaybackOrder.DEFAULT,
Expand All @@ -61,7 +61,7 @@ class ReportingHelper(

fun reportProgress(
lifecycleOwner: LifecycleOwner,
playbackController: PlaybackController,
playbackController: PlaybackController?,
item: BaseItemDto,
streamInfo: StreamInfo,
position: Long,
Expand All @@ -79,8 +79,8 @@ class ReportingHelper(
PlayMethod.DirectStream -> org.jellyfin.sdk.model.api.PlayMethod.DIRECT_STREAM
PlayMethod.DirectPlay -> org.jellyfin.sdk.model.api.PlayMethod.DIRECT_PLAY
},
audioStreamIndex = playbackController.audioStreamIndex,
subtitleStreamIndex = playbackController.subtitleStreamIndex,
audioStreamIndex = playbackController?.audioStreamIndex,
subtitleStreamIndex = playbackController?.subtitleStreamIndex,
isMuted = false,
repeatMode = RepeatMode.REPEAT_NONE,
playbackOrder = PlaybackOrder.DEFAULT,
Expand Down

0 comments on commit f37036f

Please sign in to comment.