Fix quality to be stream quality. Cosmetic changes transcode decision
This commit is contained in:
parent
76357336a6
commit
c2d6aa49b0
1 changed files with 14 additions and 9 deletions
23
tautulli.py
23
tautulli.py
|
@ -79,20 +79,25 @@ for session in sessions.keys():
|
||||||
if decision == 'copy':
|
if decision == 'copy':
|
||||||
decision = 'direct stream'
|
decision = 'direct stream'
|
||||||
|
|
||||||
quality = sessions[session]['video_resolution']
|
video_decision = sessions[session]['stream_video_decision']
|
||||||
|
|
||||||
|
if video_decision == 'copy':
|
||||||
|
video_decision = 'direct stream'
|
||||||
|
|
||||||
|
quality = sessions[session]['stream_video_resolution']
|
||||||
|
|
||||||
# If the video resolution is empty. Asssume it's an audio stream
|
# If the video resolution is empty. Asssume it's an audio stream
|
||||||
if not quality:
|
if not quality:
|
||||||
quality = sessions[session]['container']
|
quality = sessions[session]['container'].upper()
|
||||||
|
|
||||||
elif quality == 'sd':
|
elif quality in ('SD', 'sd'):
|
||||||
quality = sessions[session]['video_resolution'].upper()
|
quality = sessions[session]['stream_video_resolution'].upper()
|
||||||
|
|
||||||
elif quality == '4k':
|
elif quality in '4k':
|
||||||
quality = sessions[session]['video_resolution']
|
quality = sessions[session]['stream_video_resolution'].upper()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
quality = '{}p'.format(sessions[session]['video_resolution'])
|
quality = '{}p'.format(sessions[session]['stream_video_resolution'])
|
||||||
|
|
||||||
influx_payload.append(
|
influx_payload.append(
|
||||||
{
|
{
|
||||||
|
@ -110,8 +115,8 @@ for session in sessions.keys():
|
||||||
"name": sessions[session]['friendly_name'],
|
"name": sessions[session]['friendly_name'],
|
||||||
"title": sessions[session]['full_title'],
|
"title": sessions[session]['full_title'],
|
||||||
"quality": quality,
|
"quality": quality,
|
||||||
"video_decision": sessions[session]['stream_video_decision'],
|
"video_decision": video_decision.title(),
|
||||||
"transcode_decision": decision,
|
"transcode_decision": decision.title(),
|
||||||
"platform": sessions[session]['platform'],
|
"platform": sessions[session]['platform'],
|
||||||
"product_version": sessions[session]['product_version'],
|
"product_version": sessions[session]['product_version'],
|
||||||
"quality_profile": sessions[session]['quality_profile'],
|
"quality_profile": sessions[session]['quality_profile'],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue