################################################################################################# __addon__ = xbmcaddon.Addon(id='plugin.video.jellyfin') __base__ = xbmc.translatePath( os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi')) sys.path.insert(0, __base__) ################################################################################################# from entrypoint import Context # noqa: E402 from helper import LazyLogger # noqa: E402 ################################################################################################# LOG = LazyLogger(__name__) ################################################################################################# if __name__ == "__main__": LOG.debug("--->[ context ]") try: Context(True) except Exception as error: LOG.exception(error) LOG.info("---<[ context ]")
################################################################################################# __addon__ = xbmcaddon.Addon(id='plugin.video.jellyfin') __base__ = xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi')) sys.path.insert(0, __base__) ################################################################################################# from entrypoint import Events # noqa: E402 from helper import LazyLogger # noqa: E402 ################################################################################################# LOG = LazyLogger(__name__) ################################################################################################# if __name__ == "__main__": LOG.debug("--->[ default ]") try: Events() except Exception as error: LOG.exception(error) LOG.info("---<[ default ]")
except Exception as error: LOG.exception(error) if service is not None: # TODO: fix this properly as to not match on str() if 'ExitService' not in str(error): service.shutdown() if 'RestartService' in str(error): service.reload_objects() self.exception = error if __name__ == "__main__": LOG.info("-->[ service ]") LOG.info("Delay startup by %s seconds.", DELAY) while True: if not settings('enableAddon.bool'): LOG.warning("Jellyfin for Kodi is not enabled.") break try: session = ServiceManager() session.start() session.join() # Block until the thread exits. if 'RestartService' in str(session.exception): continue