mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-13 21:56:11 +00:00
changed log statements to remove MB Sync
This commit is contained in:
parent
850f75e160
commit
be07c1125d
1 changed files with 25 additions and 25 deletions
|
@ -26,7 +26,7 @@ class WriteKodiDB():
|
||||||
def updatePlayCountFromKodi(self, id, type, playcount=0):
|
def updatePlayCountFromKodi(self, id, type, playcount=0):
|
||||||
#when user marks item watched from kodi interface update this in MB3
|
#when user marks item watched from kodi interface update this in MB3
|
||||||
xbmc.sleep(sleepVal)
|
xbmc.sleep(sleepVal)
|
||||||
utils.logMsg("MB3 Sync", "updatePlayCountFromKodi Called")
|
utils.logMsg("Emby", "updatePlayCountFromKodi Called")
|
||||||
|
|
||||||
mb3Id = ReadKodiDB().getEmbyIdByKodiId(id, type)
|
mb3Id = ReadKodiDB().getEmbyIdByKodiId(id, type)
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class WriteKodiDB():
|
||||||
userid = downloadUtils.getUserId()
|
userid = downloadUtils.getUserId()
|
||||||
|
|
||||||
watchedurl = 'http://' + server + '/mediabrowser/Users/' + userid + '/PlayedItems/' + mb3Id
|
watchedurl = 'http://' + server + '/mediabrowser/Users/' + userid + '/PlayedItems/' + mb3Id
|
||||||
utils.logMsg("MB3 Sync","watchedurl -->" + watchedurl)
|
utils.logMsg("Emby","watchedurl -->" + watchedurl)
|
||||||
if playcount != 0:
|
if playcount != 0:
|
||||||
downloadUtils.downloadUrl(watchedurl, postBody="", type="POST")
|
downloadUtils.downloadUrl(watchedurl, postBody="", type="POST")
|
||||||
else:
|
else:
|
||||||
|
@ -527,15 +527,15 @@ class WriteKodiDB():
|
||||||
if propertyValue != None:
|
if propertyValue != None:
|
||||||
if type(propertyValue) is int:
|
if type(propertyValue) is int:
|
||||||
#xbmc.sleep(sleepVal)
|
#xbmc.sleep(sleepVal)
|
||||||
utils.logMsg("MB3 Sync","updating property..." + str(propertyName))
|
utils.logMsg("Emby","updating property..." + str(propertyName))
|
||||||
utils.logMsg("MB3 Sync","kodi value:" + str(KodiItem[propertyName]) + " MB value: " + str(propertyValue))
|
utils.logMsg("Emby","kodi value:" + str(KodiItem[propertyName]) + " MB value: " + str(propertyValue))
|
||||||
params.append("\"" + propertyName + "\": " + str(propertyValue))
|
params.append("\"" + propertyName + "\": " + str(propertyValue))
|
||||||
#xbmc.executeJSONRPC(jsoncommand_i %(id, propertyName, propertyValue))
|
#xbmc.executeJSONRPC(jsoncommand_i %(id, propertyName, propertyValue))
|
||||||
changes = True
|
changes = True
|
||||||
else:
|
else:
|
||||||
#xbmc.sleep(sleepVal)
|
#xbmc.sleep(sleepVal)
|
||||||
utils.logMsg("MB3 Sync","updating property..." + str(propertyName))
|
utils.logMsg("Emby","updating property..." + str(propertyName))
|
||||||
utils.logMsg("MB3 Sync","kodi value:" + KodiItem[propertyName] + " MB value: " + propertyValue)
|
utils.logMsg("Emby","kodi value:" + KodiItem[propertyName] + " MB value: " + propertyValue)
|
||||||
params.append("\"" + propertyName + "\": \"" + propertyValue + "\"")
|
params.append("\"" + propertyName + "\": \"" + propertyValue + "\"")
|
||||||
#xbmc.executeJSONRPC(jsoncommand_s %(id, propertyName, propertyValue.encode('utf-8')))
|
#xbmc.executeJSONRPC(jsoncommand_s %(id, propertyName, propertyValue.encode('utf-8')))
|
||||||
changes = True
|
changes = True
|
||||||
|
@ -566,14 +566,14 @@ class WriteKodiDB():
|
||||||
if propertyValue != None:
|
if propertyValue != None:
|
||||||
if type(propertyValue) is int:
|
if type(propertyValue) is int:
|
||||||
xbmc.sleep(sleepVal)
|
xbmc.sleep(sleepVal)
|
||||||
utils.logMsg("MB3 Sync","updating property..." + str(propertyName))
|
utils.logMsg("Emby","updating property..." + str(propertyName))
|
||||||
utils.logMsg("MB3 Sync","kodi value:" + str(KodiItem[propertyName]) + " MB value: " + str(propertyValue))
|
utils.logMsg("Emby","kodi value:" + str(KodiItem[propertyName]) + " MB value: " + str(propertyValue))
|
||||||
xbmc.executeJSONRPC(jsoncommand_i %(id, propertyName, propertyValue))
|
xbmc.executeJSONRPC(jsoncommand_i %(id, propertyName, propertyValue))
|
||||||
changes = True
|
changes = True
|
||||||
else:
|
else:
|
||||||
xbmc.sleep(sleepVal)
|
xbmc.sleep(sleepVal)
|
||||||
utils.logMsg("MB3 Sync","updating property..." + str(propertyName))
|
utils.logMsg("Emby","updating property..." + str(propertyName))
|
||||||
utils.logMsg("MB3 Sync","kodi value:" + KodiItem[propertyName] + " MB value: " + propertyValue)
|
utils.logMsg("Emby","kodi value:" + KodiItem[propertyName] + " MB value: " + propertyValue)
|
||||||
xbmc.executeJSONRPC(jsoncommand_s %(id, propertyName, propertyValue.encode('utf-8')))
|
xbmc.executeJSONRPC(jsoncommand_s %(id, propertyName, propertyValue.encode('utf-8')))
|
||||||
changes = True
|
changes = True
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ class WriteKodiDB():
|
||||||
|
|
||||||
if pendingChanges:
|
if pendingChanges:
|
||||||
#xbmc.sleep(sleepVal)
|
#xbmc.sleep(sleepVal)
|
||||||
utils.logMsg("MB3 Sync","updating propertyarray... Name:" + str(propertyName) + " Current:" + str(currentvalues) + " New:" + str(json_array))
|
utils.logMsg("Emby","updating propertyarray... Name:" + str(propertyName) + " Current:" + str(currentvalues) + " New:" + str(json_array))
|
||||||
params.append("\"" + propertyName + "\": " + json_array)
|
params.append("\"" + propertyName + "\": " + json_array)
|
||||||
#xbmc.executeJSONRPC(jsoncommand %(id,propertyName,json_array))
|
#xbmc.executeJSONRPC(jsoncommand %(id,propertyName,json_array))
|
||||||
|
|
||||||
|
@ -636,7 +636,7 @@ class WriteKodiDB():
|
||||||
|
|
||||||
if pendingChanges:
|
if pendingChanges:
|
||||||
xbmc.sleep(sleepVal)
|
xbmc.sleep(sleepVal)
|
||||||
utils.logMsg("MB3 Sync","updating propertyarray... Name:" + str(propertyName) + " Current:" + str(currentvalues) + " New:" + str(json_array))
|
utils.logMsg("Emby","updating propertyarray... Name:" + str(propertyName) + " Current:" + str(currentvalues) + " New:" + str(json_array))
|
||||||
xbmc.executeJSONRPC(jsoncommand %(id,propertyName,json_array))
|
xbmc.executeJSONRPC(jsoncommand %(id,propertyName,json_array))
|
||||||
|
|
||||||
return pendingChanges
|
return pendingChanges
|
||||||
|
@ -745,9 +745,9 @@ class WriteKodiDB():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
connection.commit()
|
connection.commit()
|
||||||
utils.logMsg("MB3 Sync","Added movie to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
utils.logMsg("Emby","Added movie to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
||||||
except:
|
except:
|
||||||
utils.logMsg("MB3 Sync","Error adding movie to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
utils.logMsg("Emby","Error adding movie to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
||||||
actionPerformed = False
|
actionPerformed = False
|
||||||
finally:
|
finally:
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
@ -835,9 +835,9 @@ class WriteKodiDB():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
connection.commit()
|
connection.commit()
|
||||||
utils.logMsg("MB3 Sync","Added musicvideo to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
utils.logMsg("Emby","Added musicvideo to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
||||||
except:
|
except:
|
||||||
utils.logMsg("MB3 Sync","Error adding musicvideo to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
utils.logMsg("Emby","Error adding musicvideo to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
||||||
actionPerformed = False
|
actionPerformed = False
|
||||||
finally:
|
finally:
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
@ -946,9 +946,9 @@ class WriteKodiDB():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
connection.commit()
|
connection.commit()
|
||||||
utils.logMsg("MB3 Sync","Added TV Show to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
utils.logMsg("Emby","Added TV Show to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
||||||
except:
|
except:
|
||||||
utils.logMsg("MB3 Sync","Error adding tvshow to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
utils.logMsg("Emby","Error adding tvshow to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
||||||
actionPerformed = False
|
actionPerformed = False
|
||||||
finally:
|
finally:
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
@ -1060,9 +1060,9 @@ class WriteKodiDB():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
connection.commit()
|
connection.commit()
|
||||||
utils.logMsg("MB3 Sync","Added TV Show to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
utils.logMsg("Emby","Added TV Show to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
||||||
except:
|
except:
|
||||||
utils.logMsg("MB3 Sync","Error adding tvshow to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
utils.logMsg("Emby","Error adding tvshow to Kodi Library",MBitem["Id"] + " - " + MBitem["Name"])
|
||||||
actionPerformed = False
|
actionPerformed = False
|
||||||
finally:
|
finally:
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
@ -1113,7 +1113,7 @@ class WriteKodiDB():
|
||||||
#use sqlite to set the resume point while json api doesn't support this yet
|
#use sqlite to set the resume point while json api doesn't support this yet
|
||||||
#todo --> submit PR to kodi team to get this added to the jsonrpc api
|
#todo --> submit PR to kodi team to get this added to the jsonrpc api
|
||||||
|
|
||||||
utils.logMsg("MB3 Sync","setting resume point in kodi db..." + fileType + ": " + str(id))
|
utils.logMsg("Emby","setting resume point in kodi db..." + fileType + ": " + str(id))
|
||||||
xbmc.sleep(sleepVal)
|
xbmc.sleep(sleepVal)
|
||||||
connection = utils.KodiSQL()
|
connection = utils.KodiSQL()
|
||||||
cursor = connection.cursor( )
|
cursor = connection.cursor( )
|
||||||
|
@ -1153,9 +1153,9 @@ class WriteKodiDB():
|
||||||
xbmc.sleep(sleepVal)
|
xbmc.sleep(sleepVal)
|
||||||
connection = utils.KodiSQL()
|
connection = utils.KodiSQL()
|
||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
utils.logMsg("MB3 Sync","setting filename in kodi db..." + fileType + ": " + str(id))
|
utils.logMsg("Emby","setting filename in kodi db..." + fileType + ": " + str(id))
|
||||||
utils.logMsg("MB3 Sync","old filename -->" + oldFileName)
|
utils.logMsg("Emby","old filename -->" + oldFileName)
|
||||||
utils.logMsg("MB3 Sync","new filename -->" + newFileName)
|
utils.logMsg("Emby","new filename -->" + newFileName)
|
||||||
|
|
||||||
######### PROCESS TV SHOW ############
|
######### PROCESS TV SHOW ############
|
||||||
if fileType == "tvshow":
|
if fileType == "tvshow":
|
||||||
|
@ -1228,7 +1228,7 @@ class WriteKodiDB():
|
||||||
connection.commit()
|
connection.commit()
|
||||||
actionPerformed = True
|
actionPerformed = True
|
||||||
except:
|
except:
|
||||||
utils.logMsg("MB3 Sync","Error setting filename in kodi db for: " + fileType + ": " + str(id))
|
utils.logMsg("Emby","Error setting filename in kodi db for: " + fileType + ": " + str(id))
|
||||||
actionPerformed = False
|
actionPerformed = False
|
||||||
finally:
|
finally:
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
Loading…
Reference in a new issue