Merge pull request #1995 from cewert/fix-postplaybackinfo-crash

This commit is contained in:
Charles Ewert 2024-10-18 17:35:19 -04:00 committed by GitHub
commit 0c80285d9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,8 +47,8 @@ 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 LCase(selectedAudioStream.Codec) = "aac"
if LCase(selectedAudioStream.Profile) = "main" or LCase(selectedAudioStream.Profile) = "he-aac"
if 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"
if rule.AudioCodec = "aac"