mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Pass HDR library metadata to kodi to display logos
Fix indentation error Update actions.py Update api.py
This commit is contained in:
parent
1caa69f831
commit
98a7ace541
3 changed files with 17 additions and 3 deletions
|
@ -73,7 +73,20 @@ class API(object):
|
||||||
|
|
||||||
for track in tracks:
|
for track in tracks:
|
||||||
|
|
||||||
|
if "DvProfile" in track:
|
||||||
|
track['hdrtype'] = "dolbyvision"
|
||||||
|
|
||||||
|
elif track['VideoRangeType'] in ["HDR10", "HDR10Plus"]:
|
||||||
|
track['hdrtype'] = "hdr10"
|
||||||
|
|
||||||
|
elif "HLG" in track['VideoRangeType']:
|
||||||
|
track['hdrtype'] = "hlg"
|
||||||
|
|
||||||
|
elif track['VideoRangeType'] in ["SDR", "Unknown"]:
|
||||||
|
track['hdrtype'] = ""
|
||||||
|
|
||||||
track.update({
|
track.update({
|
||||||
|
'hdrtype': track.get('hdrtype', "").lower(),
|
||||||
'codec': track.get('Codec', "").lower(),
|
'codec': track.get('Codec', "").lower(),
|
||||||
'profile': track.get('Profile', "").lower(),
|
'profile': track.get('Profile', "").lower(),
|
||||||
'height': track.get('Height'),
|
'height': track.get('Height'),
|
||||||
|
|
|
@ -455,6 +455,7 @@ class Actions(object):
|
||||||
|
|
||||||
for track in obj['Streams']['video']:
|
for track in obj['Streams']['video']:
|
||||||
listitem.addStreamInfo('video', {
|
listitem.addStreamInfo('video', {
|
||||||
|
'hdrtype': track['hdrtype'],
|
||||||
'duration': obj['Runtime'],
|
'duration': obj['Runtime'],
|
||||||
'aspect': track['aspect'],
|
'aspect': track['aspect'],
|
||||||
'codec': track['codec'],
|
'codec': track['codec'],
|
||||||
|
|
|
@ -258,10 +258,10 @@ add_bookmark_obj = ["{FileId}", "{PlayCount}", "{DatePlayed}", "{Resume}", "{Run
|
||||||
add_streams_obj = ["{FileId}", "{Streams}", "{Runtime}"]
|
add_streams_obj = ["{FileId}", "{Streams}", "{Runtime}"]
|
||||||
add_stream_video = """
|
add_stream_video = """
|
||||||
INSERT INTO streamdetails(idFile, iStreamType, strVideoCodec, fVideoAspect, iVideoWidth,
|
INSERT INTO streamdetails(idFile, iStreamType, strVideoCodec, fVideoAspect, iVideoWidth,
|
||||||
iVideoHeight, iVideoDuration, strStereoMode)
|
iVideoHeight, iVideoDuration, strStereoMode, strHdrType)
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||||
"""
|
"""
|
||||||
add_stream_video_obj = ["{FileId}", 0, "{codec}", "{aspect}", "{width}", "{height}", "{Runtime}", "{3d}"]
|
add_stream_video_obj = ["{FileId}", 0, "{codec}", "{aspect}", "{width}", "{height}", "{Runtime}", "{3d}", "{hdrtype}"]
|
||||||
add_stream_audio = """
|
add_stream_audio = """
|
||||||
INSERT INTO streamdetails(idFile, iStreamType, strAudioCodec, iAudioChannels, strAudioLanguage)
|
INSERT INTO streamdetails(idFile, iStreamType, strAudioCodec, iAudioChannels, strAudioLanguage)
|
||||||
VALUES (?, ?, ?, ?, ?)
|
VALUES (?, ?, ?, ?, ?)
|
||||||
|
|
Loading…
Reference in a new issue