Skip to content

Commit

Permalink
Fix crash when item has no media sources
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Jul 7, 2024
1 parent eacbfe7 commit 08cb004
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,9 @@ private VideoOptions buildExoPlayerOptions(@Nullable Integer forcedSubtitleIndex
internalOptions.setEnableDirectStream(false);
internalOptions.setMaxAudioChannels(Utils.downMixAudio(mFragment.getContext()) ? 2 : null); //have to downmix at server
internalOptions.setSubtitleStreamIndex(forcedSubtitleIndex);
if (!isLiveTv) {
internalOptions.setMediaSourceId(getCurrentMediaSource().getId());
MediaSourceInfo currentMediaSource = getCurrentMediaSource();
if (!isLiveTv && currentMediaSource != null) {
internalOptions.setMediaSourceId(currentMediaSource.getId());
}
DeviceProfile internalProfile = new ExoPlayerProfile(
mFragment.getContext(),
Expand Down

0 comments on commit 08cb004

Please sign in to comment.