Пример #1
0
 def __init__(self):
     # Create and establish the Netflix session
     self.nfsession = NFSessionOperations()
     # Create MSL handler
     self.msl_handler = MSLHandler(self.nfsession)
     # Initialize correlated features
     self.directory_builder = DirectoryBuilder(self.nfsession)
     self.action_controller = ActionController(self.nfsession,
                                               self.msl_handler,
                                               self.directory_builder)
     # Register the functions to IPC
     slots = (self.nfsession.slots + self.msl_handler.slots +
              self.directory_builder.slots + [self.library_auto_update])
     for slot in slots:
         func_name = slot.__name__
         # For HTTP IPC (http_server.py)
         self.http_ipc_slots[func_name] = slot
         # For AddonSignals IPC
         common.register_slot(slot, func_name)
Пример #2
0
 def start_services(self):
     """
     Start the background services
     """
     from resources.lib.services.playback.action_controller import ActionController
     from resources.lib.services.library_updater import LibraryUpdateService
     from resources.lib.services.settings_monitor import SettingsMonitor
     for server in self.SERVERS:
         server['instance'].server_activate()
         server['instance'].timeout = 1
         server['thread'].start()
         info('[{}] Thread started'.format(server['name']))
     self.controller = ActionController()
     self.library_updater = LibraryUpdateService()
     self.settings_monitor = SettingsMonitor()
     # Mark the service as active
     self._set_service_status('running')
     if not g.ADDON.getSettingBool('disable_startup_notification'):
         from resources.lib.kodi.ui import show_notification
         show_notification(get_local_string(30110))
Пример #3
0
 def start_services(self):
     """
     Start the background services
     """
     from resources.lib.services.playback.action_controller import ActionController
     from resources.lib.services.library_updater import LibraryUpdateService
     for server in self.SERVERS:
         server['instance'].server_activate()
         server['instance'].timeout = 1
         server['thread'].start()
         LOG.info('[{}] Thread started'.format(server['name']))
     self.controller = ActionController()
     self.library_updater = LibraryUpdateService()
     # We reset the value in case of any eventuality (add-on disabled, update, etc)
     WndHomeProps[WndHomeProps.CURRENT_DIRECTORY] = None
     # Mark the service as active
     self._set_service_status('running')
     if not G.ADDON.getSettingBool('disable_startup_notification'):
         from resources.lib.kodi.ui import show_notification
         show_notification(get_local_string(30110))