Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop trying to force mp3 on live tv streams #2047

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion source/api/Items.bs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ function ItemPostPlaybackInfo(id as string, mediaSourceId = "" as string, audioT
}
deviceProfile = getDeviceProfile()

isLiveTV = false

' 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)
Expand All @@ -35,6 +37,7 @@ function ItemPostPlaybackInfo(id as string, mediaSourceId = "" as string, audioT
else
' No mediaSourceId? Must be LiveTV...
params.EnableDirectPlay = false
isLiveTV = true
end if

myGLobal = m.global
Expand All @@ -47,7 +50,7 @@ function ItemPostPlaybackInfo(id as string, mediaSourceId = "" as string, audioT

' force the server to transcode AAC profiles we don't support to MP3 instead of the usual AAC
' TODO: Remove this after server adds support for transcoding AAC from one profile to another
if selectedAudioStream.Codec <> invalid and LCase(selectedAudioStream.Codec) = "aac"
if not isLiveTV and selectedAudioStream.Codec <> invalid and LCase(selectedAudioStream.Codec) = "aac"
if selectedAudioStream.Profile <> invalid and LCase(selectedAudioStream.Profile) = "main" or LCase(selectedAudioStream.Profile) = "he-aac"
for each rule in deviceProfile.TranscodingProfiles
if rule.Container = "ts" or rule.Container = "mp4"
Expand Down
Loading