Skip to content

Commit

Permalink
Merge pull request #1931 from croneter/fix-matrix-hdr-streamdetails
Browse files Browse the repository at this point in the history
Kodi Matrix: Fix sync not working (introduced in commit 664a68c)
  • Loading branch information
croneter authored Feb 25, 2023
2 parents d329995 + cc69374 commit 72ea332
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions resources/lib/kodi_db/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,17 +536,29 @@ def modify_streams(self, fileid, streamdetails=None, runtime=None):
if not streamdetails:
return
for videotrack in streamdetails['video']:
self.cursor.execute('''
INSERT OR REPLACE INTO streamdetails(
idFile, iStreamType, strVideoCodec, fVideoAspect,
iVideoWidth, iVideoHeight, iVideoDuration ,strStereoMode,
strHdrType)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
''', (fileid, 0, videotrack['codec'],
videotrack['aspect'], videotrack['width'],
videotrack['height'], runtime,
videotrack['video3DFormat'],
videotrack['hdr']))
if v.KODIVERSION < 20:
self.cursor.execute('''
INSERT OR REPLACE INTO streamdetails(
idFile, iStreamType, strVideoCodec, fVideoAspect,
iVideoWidth, iVideoHeight, iVideoDuration,
strStereoMode)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
''', (fileid, 0, videotrack['codec'],
videotrack['aspect'], videotrack['width'],
videotrack['height'], runtime,
videotrack['video3DFormat']))
else:
self.cursor.execute('''
INSERT OR REPLACE INTO streamdetails(
idFile, iStreamType, strVideoCodec, fVideoAspect,
iVideoWidth, iVideoHeight, iVideoDuration,
strStereoMode, strHdrType)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
''', (fileid, 0, videotrack['codec'],
videotrack['aspect'], videotrack['width'],
videotrack['height'], runtime,
videotrack['video3DFormat'],
videotrack['hdr']))
for audiotrack in streamdetails['audio']:
self.cursor.execute('''
INSERT OR REPLACE INTO streamdetails(
Expand Down

0 comments on commit 72ea332

Please sign in to comment.