Merge pull request #1936 from jellyfin/jf-1925-livetv-for-2.1.z

This commit is contained in:
Charles Ewert 2024-09-27 14:27:33 -07:00 committed by GitHub
commit e263abf3a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="ChannelData" extends="JFContentItem">
<interface>
<field id="image" type="node" onChange="setPoster" />
<field id="channelID" type="string" />
<field id="selectedAudioStreamIndex" type="integer" value="0" />
</interface>

View File

@ -26,7 +26,17 @@ function ItemPostPlaybackInfo(id as string, mediaSourceId = "" as string, audioT
"SubtitleStreamIndex": subtitleTrackIndex
}
if mediaSourceId <> "" then params.MediaSourceId = mediaSourceId
' Note: Jellyfin v10.9+ now remuxs LiveTV and does not allow DirectPlay anymore.
' Because of this, we need to tell the server "EnableDirectPlay = false" so that we receive the
' transcoding URL (which is just a remux and not a transcode; unless it is)
' The web handles this by disabling EnableDirectPlay on a Retry, but we don't currently Retry a Live
' TV stream, thus we just turn it off on the first try here.
if mediaSourceId <> ""
params.MediaSourceId = mediaSourceId
else
' No mediaSourceId? Must be LiveTV...
params.EnableDirectPlay = false
end if
if audioTrackIndex > -1 then params.AudioStreamIndex = audioTrackIndex