mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
DTS-HD MA fix
This commit is contained in:
parent
a39784cb81
commit
142c5cad01
1 changed files with 7 additions and 6 deletions
|
@ -125,16 +125,17 @@ class API():
|
||||||
# Sort through the Video, Audio, Subtitle tracks
|
# Sort through the Video, Audio, Subtitle tracks
|
||||||
for mediaStream in MediaStreams:
|
for mediaStream in MediaStreams:
|
||||||
|
|
||||||
type = mediaStream.get("Type", "")
|
type = mediaStream.get('Type', "")
|
||||||
|
profile = mediaStream.get('Profile', "").lower()
|
||||||
|
codec = mediaStream.get('Codec', "").lower()
|
||||||
|
|
||||||
if "Video" in type:
|
if "Video" in type:
|
||||||
videotrack = {}
|
videotrack = {}
|
||||||
videotrack['videocodec'] = mediaStream.get('Codec', "").lower()
|
videotrack['videocodec'] = codec
|
||||||
container = item['MediaSources'][0].get('Container', "").lower()
|
container = item['MediaSources'][0].get('Container', "").lower()
|
||||||
if "msmpeg4" in videotrack['videocodec']:
|
if "msmpeg4" in videotrack['videocodec']:
|
||||||
videotrack['videocodec'] = "divx"
|
videotrack['videocodec'] = "divx"
|
||||||
elif "mpeg4" in videotrack['videocodec']:
|
elif "mpeg4" in videotrack['videocodec']:
|
||||||
profile = mediaStream.get('Profile', "").lower()
|
|
||||||
if "simple profile" in profile or profile == "":
|
if "simple profile" in profile or profile == "":
|
||||||
videotrack['videocodec'] = "xvid"
|
videotrack['videocodec'] = "xvid"
|
||||||
elif "h264" in videotrack['videocodec']:
|
elif "h264" in videotrack['videocodec']:
|
||||||
|
@ -163,9 +164,9 @@ class API():
|
||||||
|
|
||||||
elif "Audio" in type:
|
elif "Audio" in type:
|
||||||
audiotrack = {}
|
audiotrack = {}
|
||||||
audiotrack['audiocodec'] = mediaStream.get('Codec', "").lower()
|
audiotrack['audiocodec'] = codec
|
||||||
if "dts-hd ma" in audiotrack['audiocodec']:
|
if "dca" in audiotrack['audiocodec'] and "dts-hd ma" in profile:
|
||||||
audiotrack['audiocodec'] = "dts"
|
audiotrack['audiocodec'] = "dtshd_ma"
|
||||||
audiotrack['channels'] = mediaStream.get('Channels')
|
audiotrack['channels'] = mediaStream.get('Channels')
|
||||||
audiotrack['audiolanguage'] = mediaStream.get('Language')
|
audiotrack['audiolanguage'] = mediaStream.get('Language')
|
||||||
audiotracks.append(audiotrack)
|
audiotracks.append(audiotrack)
|
||||||
|
|
Loading…
Reference in a new issue