Infer values for musicvideo "track" and "premiered" fields... (#109)

* Infer values for musicvideo track and premiered fields when none are available from Emby, to support some kodi views.

* Tidy up some code style issues
This commit is contained in:
obitwentywan 2017-12-13 03:25:21 +00:00 committed by angelblue05
commit aaeb3a6272
2 changed files with 21 additions and 6 deletions

View file

@ -43,9 +43,9 @@ class KodiMusicVideos(KodiItems):
query = (
'''
INSERT INTO musicvideo(
idMVideo, idFile, c00, c04, c05, c06, c07, c08, c09, c10, c11, c12)
idMVideo, idFile, c00, c04, c05, c06, c07, c08, c09, c10, c11, c12, premiered)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
'''
)
self.cursor.execute(query, (args))
@ -56,7 +56,7 @@ class KodiMusicVideos(KodiItems):
"UPDATE musicvideo",
"SET c00 = ?, c04 = ?, c05 = ?, c06 = ?, c07 = ?, c08 = ?, c09 = ?, c10 = ?,",
"c11 = ?, c12 = ?"
"c11 = ?, c12 = ?, premiered = ?"
"WHERE idMVideo = ?"
))
self.cursor.execute(query, (args))