Fix log errors

This commit is contained in:
tomkat83 2016-09-04 16:57:06 +02:00
parent dc823c0cae
commit 339eaaa13a
5 changed files with 9 additions and 10 deletions

View file

@ -41,7 +41,7 @@ def plexCompanion(fullurl, params):
log.error("Command was not for us, machineIdentifier controller: %s, "
"our machineIdentifier : %s"
% (params['machineIdentifier'],
window('plex_machineIdentifier')), -1)
window('plex_machineIdentifier')))
return
library, key, query = PlexFunctions.ParseContainerKey(

View file

@ -374,7 +374,7 @@ class InitialSetup():
log.debug("Writing to Kodi user settings file")
log.debug("PMS machineIdentifier: %s, ip: %s, port: %s, https: %s "
% (server['machineIdentifier'], server['ip'],
server['port'], server['scheme']), 0)
server['port'], server['scheme']))
def setup(self):
"""

View file

@ -866,7 +866,7 @@ class TVShows(Items):
# try:
# showid = show[0]
# except TypeError:
# self.logMsg("Skipping: %s. Unable to add series: %s." % (itemid, seriesId), -1)
# log.error("Skipping: %s. Unable to add series: %s." % (itemid, seriesId))
log.error("Parent tvshow now found, skip item")
return False
seasonid = self.kodi_db.addSeason(showid, season)

View file

@ -48,7 +48,7 @@ class KodiMonitor(xbmc.Monitor):
'''currentPath = settings('useDirectPaths')
if window('plex_pluginpath') != currentPath:
# Plugin path value changed. Offer to reset
self.logMsg("Changed to playback mode detected", 1)
log.info("Changed to playback mode detected")
window('plex_pluginpath', value=currentPath)
resp = xbmcgui.Dialog().yesno(
heading="Playback mode change detected",
@ -119,7 +119,7 @@ class KodiMonitor(xbmc.Monitor):
kodiid = data['id']
type = data['type']
except (KeyError, TypeError):
self.logMsg("Item is invalid for emby deletion.", 1)
log.info("Item is invalid for emby deletion.")
else:
# Send the delete action to the server.
embyconn = utils.kodiSQL('emby')
@ -129,19 +129,19 @@ class KodiMonitor(xbmc.Monitor):
try:
itemid = emby_dbitem[0]
except TypeError:
self.logMsg("Could not find itemid in emby database.", 1)
log.info("Could not find itemid in emby database.")
else:
if settings('skipContextMenu') != "true":
resp = xbmcgui.Dialog().yesno(
heading="Confirm delete",
line1="Delete file on Emby Server?")
if not resp:
self.logMsg("User skipped deletion.", 1)
log.info("User skipped deletion.")
embycursor.close()
return
url = "{server}/emby/Items/%s?format=json" % itemid
self.logMsg("Deleting request: %s" % itemid)
log.info("Deleting request: %s" % itemid)
doUtils.downloadUrl(url, action_type="DELETE")
finally:
embycursor.close()'''

View file

@ -1489,8 +1489,7 @@ class LibrarySync(Thread):
self.run_internal()
except Exception as e:
window('plex_dbScan', clear=True)
log.error('LibrarySync thread crashed')
self.logMsg('Error message: %s' % e, -1)
log.error('LibrarySync thread crashed. Error message: %s' % e)
import traceback
log.error("Traceback:\n%s" % traceback.format_exc())
# Library sync thread has crashed