Fix SDR source video being identified as HDR stream video

This commit is contained in:
JonnyWong16 2020-02-05 21:37:33 -08:00
commit 7ae87fe0e7
2 changed files with 11 additions and 1 deletions

View file

@ -1569,6 +1569,15 @@ def dbcheck():
c_db.execute(
'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
try:
c_db.execute('SELECT do_notify FROM users')