import os pluginId = 'plugin.audio.qobuz' __addon__ = xbmcaddon.Addon(id=pluginId) __addonversion__ = __addon__.getAddonInfo('version') __addonid__ = __addon__.getAddonInfo('id') __cwd__ = __addon__.getAddonInfo('path') __addondir__ = __addon__.getAddonInfo('path') __libdir__ = xbmc.translatePath(os.path.join(__addondir__, 'resources', 'lib')) __qobuzdir__ = xbmc.translatePath(os.path.join(__libdir__, 'qobuz')) sys.path.append(__libdir__) sys.path.append(__qobuzdir__) from bootstrap import QobuzBootstrap __handle__ = -1 boot = QobuzBootstrap(__addon__, __handle__) boot.bootstrap_directories() def try_get_settings(): global username, password username = __addon__.getSetting('username') password = __addon__.getSetting('password') if username and password: return True return False while not (try_get_settings()): xbmc.sleep(5000)
try: if xbmc.getGlobalIdleTime() >= since: return True return False except: return False def cache_remove_old(self, **ka): self.last_garbage_on = time() clean_old(cache) def onSettingsChanged(self): pass boot = QobuzBootstrap(__addon__, 0) logLabel = 'QobuzMonitor' import pprint try: boot.bootstrap_app() monitor = Monitor() player = MyPlayer() alive = True while alive: alive = False try: alive = not monitor.abortRequested except Exception as e: print "Exception while getting abortRequested..." raise e if not alive: