def __init__(self, kodi): """ Initialise object :type kodi: resources.lib.kodiwrapper.KodiWrapper """ self._kodi = kodi self._proxies = kodi.get_proxies() self._auth = VtmGoAuth(kodi)
def __init__(self): """ Initialise object """ self._auth = VtmGoAuth(kodiutils.get_setting('username'), kodiutils.get_setting('password'), 'VTM', kodiutils.get_setting('profile'), kodiutils.get_tokens_path()) self._api = VtmGo(self._auth)
def __init__(self): Monitor.__init__(self) self.kodi = KodiWrapper() self.vtm_go = VtmGo(self.kodi) self.vtm_go_auth = VtmGoAuth(self.kodi) self.update_interval = 24 * 3600 # Every 24 hours self.cache_expiry = 30 * 24 * 3600 # One month
def __init__(self): """ Initialise object """ try: self._auth = VtmGoAuth(kodiutils.get_setting('username'), kodiutils.get_setting('password'), 'VTM', kodiutils.get_setting('profile'), kodiutils.get_tokens_path()) except NoLoginException: self._auth = None self._vtm_go = VtmGo(self._auth)
def __init__(self, kodi): """ Initialise object :type kodi: resources.lib.kodiwrapper.KodiWrapper """ self._kodi = kodi self._auth = VtmGoAuth(kodi) self._session = requests.session() self._session.proxies = kodi.get_proxies() self._authenticate()
def __init__(self, port): """ Initialise object :type port: int """ self._auth = VtmGoAuth(kodiutils.get_setting('username'), kodiutils.get_setting('password'), 'VTM', kodiutils.get_setting('profile'), kodiutils.get_tokens_path()) self._vtm_go = VtmGo(self._auth) self._vtm_go_epg = VtmGoEpg() self.port = port
def check_credentials(): """ Check credentials (called from settings) """ try: auth = VtmGoAuth(kodi) auth.clear_token() auth.get_token() kodi.show_ok_dialog( message=kodi.localize(30202)) # Credentials are correct! except InvalidLoginException: kodi.show_ok_dialog( message=kodi.localize(30203)) # Your credentials are not valid! kodi.open_settings()
def check_credentials(self): """ Check credentials (called from settings) """ try: from resources.lib.vtmgo.vtmgoauth import VtmGoAuth auth = VtmGoAuth(self._kodi) auth.clear_token() auth.get_token() self._kodi.show_ok_dialog( message=self._kodi.localize(30202)) # Credentials are correct! except InvalidLoginException: self._kodi.show_ok_dialog(message=self._kodi.localize( 30203)) # Your credentials are not valid! except LoginErrorException as e: self._kodi.show_ok_dialog(message=self._kodi.localize( 30702, code=e.code)) # Unknown error while logging in: {code} self._kodi.open_settings()
def __init__(self, kodi): self._kodi = kodi # type: KodiWrapper self._proxies = kodi.get_proxies() self._auth = VtmGoAuth(kodi)