def __init__(self, provider_class, handler=Source):
     super(SourceService, self).__init__(provider_class)
     self._handler = handler
     addonid = KodiUtils.get_addon_info('id')
     Cache(addonid, 'page', 0).clear()
     Cache(addonid, 'children', 0).clear()
     Cache(addonid, 'items', 0).clear()
 def __init__(self, request, client_address, server):
     self._system_monitor = KodiUtils.get_system_monitor()
     self._account_manager = AccountManager(server.service.profile_path)
     self._addonid = KodiUtils.get_addon_info('id')
     expiration = datetime.timedelta(minutes=KodiUtils.get_cache_expiration_time())
     self._page_cache = Cache(self._addonid, 'page', expiration)
     self._children_cache = Cache(self._addonid, 'children', expiration)
     self._items_cache = Cache(self._addonid, 'items', expiration)
     BaseHandler.__init__(self, request, client_address, server)
Exemple #3
0
 def _clear_cache(self):
     Cache(self._addonid, 'page', 0).clear()
     Cache(self._addonid, 'children', 0).clear()
     Cache(self._addonid, 'items', 0).clear()
 def __init__(self, source_mode = False):
     super(GoogleDrive, self).__init__('googledrive', source_mode)
     self._items_cache = Cache(KodiUtils.get_addon_info('id'), 'items', datetime.timedelta(minutes=KodiUtils.get_cache_expiration_time()))