a little more error handling added
This commit is contained in:
parent
e44d2a4b3d
commit
025fd31da8
1 changed files with 16 additions and 0 deletions
|
@ -58,6 +58,10 @@ class WriteKodiVideoDB():
|
||||||
|
|
||||||
MBitem = ReadEmbyDB().getFullItem(embyId)
|
MBitem = ReadEmbyDB().getFullItem(embyId)
|
||||||
|
|
||||||
|
if not MBitem:
|
||||||
|
utils.logMsg("ADD movie to Kodi library FAILED", "Item %s not found on server!" %embyId)
|
||||||
|
return
|
||||||
|
|
||||||
# If the item already exist in the local Kodi DB we'll perform a full item update
|
# If the item already exist in the local Kodi DB we'll perform a full item update
|
||||||
# If the item doesn't exist, we'll add it to the database
|
# If the item doesn't exist, we'll add it to the database
|
||||||
|
|
||||||
|
@ -225,6 +229,10 @@ class WriteKodiVideoDB():
|
||||||
downloadUtils = DownloadUtils()
|
downloadUtils = DownloadUtils()
|
||||||
|
|
||||||
MBitem = ReadEmbyDB().getFullItem(embyId)
|
MBitem = ReadEmbyDB().getFullItem(embyId)
|
||||||
|
|
||||||
|
if not MBitem:
|
||||||
|
utils.logMsg("ADD musicvideo to Kodi library FAILED", "Item %s not found on server!" %embyId)
|
||||||
|
return
|
||||||
|
|
||||||
# If the item already exist in the local Kodi DB we'll perform a full item update
|
# If the item already exist in the local Kodi DB we'll perform a full item update
|
||||||
# If the item doesn't exist, we'll add it to the database
|
# If the item doesn't exist, we'll add it to the database
|
||||||
|
@ -358,6 +366,10 @@ class WriteKodiVideoDB():
|
||||||
|
|
||||||
MBitem = ReadEmbyDB().getFullItem(embyId)
|
MBitem = ReadEmbyDB().getFullItem(embyId)
|
||||||
|
|
||||||
|
if not MBitem:
|
||||||
|
utils.logMsg("ADD tvshow to Kodi library FAILED", "Item %s not found on server!" %embyId)
|
||||||
|
return
|
||||||
|
|
||||||
timeInfo = API().getTimeInfo(MBitem)
|
timeInfo = API().getTimeInfo(MBitem)
|
||||||
userData=API().getUserData(MBitem)
|
userData=API().getUserData(MBitem)
|
||||||
|
|
||||||
|
@ -489,6 +501,10 @@ class WriteKodiVideoDB():
|
||||||
# If the item doesn't exist, we'll add it to the database
|
# If the item doesn't exist, we'll add it to the database
|
||||||
|
|
||||||
MBitem = ReadEmbyDB().getFullItem(embyId)
|
MBitem = ReadEmbyDB().getFullItem(embyId)
|
||||||
|
if not MBitem:
|
||||||
|
utils.logMsg("ADD episode to Kodi library FAILED", "Item %s not found on server!" %embyId)
|
||||||
|
return
|
||||||
|
|
||||||
cursor.execute("SELECT kodi_id FROM emby WHERE emby_id = ?",(MBitem["Id"],))
|
cursor.execute("SELECT kodi_id FROM emby WHERE emby_id = ?",(MBitem["Id"],))
|
||||||
result = cursor.fetchone()
|
result = cursor.fetchone()
|
||||||
if result != None:
|
if result != None:
|
||||||
|
|
Loading…
Reference in a new issue