mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Fix logging
This commit is contained in:
parent
14b1339179
commit
9c585b682c
1 changed files with 8 additions and 6 deletions
14
default.py
14
default.py
|
@ -21,9 +21,11 @@ sys.path.append(base_resource)
|
||||||
|
|
||||||
import entrypoint
|
import entrypoint
|
||||||
import utils
|
import utils
|
||||||
|
from utils import Logging, window
|
||||||
|
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
|
||||||
|
log = Logging('Default').log
|
||||||
enableProfiling = False
|
enableProfiling = False
|
||||||
|
|
||||||
class Main:
|
class Main:
|
||||||
|
@ -103,15 +105,15 @@ class Main:
|
||||||
if mode == "settings":
|
if mode == "settings":
|
||||||
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
|
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
|
||||||
elif mode in ("manualsync", "fastsync", "repair"):
|
elif mode in ("manualsync", "fastsync", "repair"):
|
||||||
if utils.window('emby_online') != "true":
|
if window('emby_online') != "true":
|
||||||
# Server is not online, do not run the sync
|
# Server is not online, do not run the sync
|
||||||
xbmcgui.Dialog().ok(heading="Emby for Kodi",
|
xbmcgui.Dialog().ok(heading="Emby for Kodi",
|
||||||
line1=("Unable to run the sync, the add-on is not "
|
line1=("Unable to run the sync, the add-on is not "
|
||||||
"connected to the Emby server."))
|
"connected to the Emby server."))
|
||||||
utils.logMsg("EMBY", "Not connected to the emby server.", 1)
|
log("EMBY", "Not connected to the emby server.", 1)
|
||||||
return
|
return
|
||||||
|
|
||||||
if utils.window('emby_dbScan') != "true":
|
if window('emby_dbScan') != "true":
|
||||||
import librarysync
|
import librarysync
|
||||||
lib = librarysync.LibrarySync()
|
lib = librarysync.LibrarySync()
|
||||||
if mode == "manualsync":
|
if mode == "manualsync":
|
||||||
|
@ -121,7 +123,7 @@ class Main:
|
||||||
else:
|
else:
|
||||||
lib.fullSync(repair=True)
|
lib.fullSync(repair=True)
|
||||||
else:
|
else:
|
||||||
utils.logMsg("EMBY", "Database scan is already running.", 1)
|
log("EMBY", "Database scan is already running.", 1)
|
||||||
|
|
||||||
elif mode == "texturecache":
|
elif mode == "texturecache":
|
||||||
import artwork
|
import artwork
|
||||||
|
@ -131,7 +133,7 @@ class Main:
|
||||||
|
|
||||||
|
|
||||||
if ( __name__ == "__main__" ):
|
if ( __name__ == "__main__" ):
|
||||||
xbmc.log('plugin.video.emby started')
|
log('plugin.video.emby started', 1)
|
||||||
|
|
||||||
if enableProfiling:
|
if enableProfiling:
|
||||||
import cProfile
|
import cProfile
|
||||||
|
@ -152,4 +154,4 @@ if ( __name__ == "__main__" ):
|
||||||
else:
|
else:
|
||||||
Main()
|
Main()
|
||||||
|
|
||||||
xbmc.log('plugin.video.emby stopped')
|
log('plugin.video.emby stopped', 1)
|
Loading…
Reference in a new issue