websocket, artwork, api, service_entry, downloadutils, contextmenu
This commit is contained in:
angelblue05 2016-10-06 23:15:23 -05:00 committed by GitHub
commit d2b6eaabb3
5 changed files with 124 additions and 123 deletions

View file

@ -26,18 +26,21 @@ from utils import settings
loghandler.config()
log = logging.getLogger("EMBY.service")
DELAY = settings('startupDelay') or 0
DELAY = int(settings('startupDelay') or 0)
#################################################################################################
if __name__ == "__main__":
log.warn("Delaying emby startup by: %s sec...", DELAY)
service = Service()
try:
if int(DELAY) and xbmc.Monitor().waitForAbort(int(DELAY)):
if DELAY and xbmc.Monitor().waitForAbort(DELAY):
raise RuntimeError("Abort event while waiting to start Emby for kodi")
# Start the service
Service().service_entry_point()
service.service_entry_point()
except Exception as error:
log.exception(error)
log.info("Forcing shutdown")
service.shutdown()