diff --git a/docs/api/source_utils_deviceCapabilities.bs.html b/docs/api/source_utils_deviceCapabilities.bs.html index 70bf61aef..523c1b406 100644 --- a/docs/api/source_utils_deviceCapabilities.bs.html +++ b/docs/api/source_utils_deviceCapabilities.bs.html @@ -197,21 +197,13 @@ ' does the users setup support surround sound? maxAudioChannels = "2" ' jellyfin expects this as a string ' in order of preference from left to right - audioCodecs = ["mp3", "vorbis", "opus", "flac", "alac", "ac4", "pcm", "wma", "wmapro"] - surroundSoundCodecs = ["eac3", "ac3", "dts"] - if globalUserSettings["playback.forceDTS"] = true - surroundSoundCodecs = ["dts", "eac3", "ac3"] - end if + audioCodecs = ["eac3", "ac3", "dts", "mp3", "vorbis", "opus", "flac", "alac", "ac4", "pcm", "wma", "wmapro"] - surroundSoundCodec = invalid if di.GetAudioOutputChannel() = "5.1 surround" maxAudioChannels = "6" - for each codec in surroundSoundCodecs - if di.CanDecodeAudio({ Codec: codec, ChCnt: 6 }).Result - surroundSoundCodec = codec - if di.CanDecodeAudio({ Codec: codec, ChCnt: 8 }).Result - maxAudioChannels = "8" - end if + for each codec in audioCodecs + if di.CanDecodeAudio({ Codec: codec, ChCnt: 8 }).Result + maxAudioChannels = "8" exit for end if end for @@ -405,38 +397,10 @@ mp4Array.Conditions = [getMaxHeightArray(), getMaxWidthArray()] end if - ' surround sound - if surroundSoundCodec <> invalid - ' add preferred surround sound codec to TranscodingProfile - transcodingProfiles.push({ - "Container": surroundSoundCodec, - "Type": "Audio", - "AudioCodec": surroundSoundCodec, - "Context": "Streaming", - "Protocol": "http", - "MaxAudioChannels": maxAudioChannels - }) - transcodingProfiles.push({ - "Container": surroundSoundCodec, - "Type": "Audio", - "AudioCodec": surroundSoundCodec, - "Context": "Static", - "Protocol": "http", - "MaxAudioChannels": maxAudioChannels - }) - - ' put codec in front of AudioCodec string - if tsArray.AudioCodec = "" - tsArray.AudioCodec = surroundSoundCodec - else - tsArray.AudioCodec = surroundSoundCodec + "," + tsArray.AudioCodec - end if - - if mp4Array.AudioCodec = "" - mp4Array.AudioCodec = surroundSoundCodec - else - mp4Array.AudioCodec = surroundSoundCodec + "," + mp4Array.AudioCodec - end if + ' add user-selected preferred codec to the front of the list + if globalUserSettings["playback.preferredAudioCodec"] <> "auto" + tsArray.AudioCodec = globalUserSettings["playback.preferredAudioCodec"] + "," + tsArray.AudioCodec + mp4Array.AudioCodec = globalUserSettings["playback.preferredAudioCodec"] + "," + mp4Array.AudioCodec end if transcodingProfiles.push(tsArray)