Fix SDR source video being identified as HDR stream video
This commit is contained in:
@@ -1569,6 +1569,15 @@ def dbcheck():
|
|||||||
c_db.execute(
|
c_db.execute(
|
||||||
'ALTER TABLE session_history_media_info ADD COLUMN stream_video_dynamic_range TEXT '
|
'ALTER TABLE session_history_media_info ADD COLUMN stream_video_dynamic_range TEXT '
|
||||||
)
|
)
|
||||||
|
|
||||||
|
result = c_db.execute('SELECT * FROM session_history_media_info '
|
||||||
|
'WHERE video_dynamic_range = "SDR" AND stream_video_dynamic_range = "HDR"').fetchone()
|
||||||
|
if result:
|
||||||
|
c_db.execute(
|
||||||
|
'UPDATE session_history_media_info SET stream_video_dynamic_range = "SDR" '
|
||||||
|
'WHERE video_dynamic_range = "SDR" AND stream_video_dynamic_range = "HDR"'
|
||||||
|
)
|
||||||
|
|
||||||
# Upgrade users table from earlier versions
|
# Upgrade users table from earlier versions
|
||||||
try:
|
try:
|
||||||
c_db.execute('SELECT do_notify FROM users')
|
c_db.execute('SELECT do_notify FROM users')
|
||||||
|
@@ -1995,7 +1995,8 @@ class PmsConnect(object):
|
|||||||
else:
|
else:
|
||||||
stream_details['video_dynamic_range'] = 'SDR'
|
stream_details['video_dynamic_range'] = 'SDR'
|
||||||
|
|
||||||
if video_details['stream_video_decision'] != 'transcode' \
|
if stream_details['video_dynamic_range'] == 'HDR' \
|
||||||
|
and video_details['stream_video_decision'] != 'transcode' \
|
||||||
or helpers.cast_to_int(video_details['stream_video_bit_depth']) > 8 \
|
or helpers.cast_to_int(video_details['stream_video_bit_depth']) > 8 \
|
||||||
and video_details['stream_video_color_space'] == 'bt2020nc':
|
and video_details['stream_video_color_space'] == 'bt2020nc':
|
||||||
stream_details['stream_video_dynamic_range'] = 'HDR'
|
stream_details['stream_video_dynamic_range'] = 'HDR'
|
||||||
|
Reference in New Issue
Block a user