def __init__(self, xml_file, location, actionArgs=None): super(PersistentBackground, self).__init__(xml_file, location, actionArgs=actionArgs) if actionArgs is None: return g.close_busy_dialog()
def __init__(self, xml_file, location, actionArgs=None, sources=None, anilist_id=None, rescrape=None, **kwargs): super(SourceSelect, self).__init__(xml_file, location, actionArgs=actionArgs) self.actionArgs = actionArgs self.sources = sources self.anilist_id = anilist_id self.rescrape = rescrape self.position = -1 self.canceled = False self.display_list = None self.last_action = 0 g.close_busy_dialog() self.stream_link = None
def __init__(self, xml_file, location, flavor=None, sources=None, **kwargs): super(WatchlistFlavorAuth, self).__init__(xml_file, location) self.flavor = flavor self.sources = sources self.position = -1 self.last_action = 0 g.close_busy_dialog() self.authorized = False
def __init__(self, xml_file, location, get_anime=None, anime_items=None, **kwargs): super(Anichart, self).__init__(xml_file, location) self.get_anime = get_anime self.anime_items = anime_items self.position = -1 self.display_list = None self.last_action = 0 g.close_busy_dialog() self.anime_item = None
def __init__(self, xml_file, xml_location, actionArgs=None): try: super(GetSources, self).__init__(xml_file, xml_location, actionArgs=actionArgs) except: BaseWindow(xml_file, xml_location).__init__(xml_file, xml_location) self.setProperty('process_started', 'false') self.position = -1 self.canceled = False self.display_list = None self.return_data = None self.args = actionArgs self.progress = 0 self.background_dialog = None self.setProperty('progress', '0') g.close_busy_dialog()
def __init__(self, xml_file, location, actionArgs=None, sources=None, anilist_id=None, rescrape=None, **kwargs): super(SourceSelect, self).__init__(xml_file, location, actionArgs=actionArgs) self.actionArgs = actionArgs self.sources = sources self.anilist_id = anilist_id self.rescrape = rescrape self.position = -1 self.canceled = False self.anime_list_entry = {} self.editor_list = None self.flavors_list = None self.anime_item = None self.last_action = 0 g.close_busy_dialog()
def re_build_database(self, silent=False): if not silent: confirm = control.yesno_dialog(g.ADDON_NAME, g.lang(30203)) if confirm == 0: return path = g.ANILIST_SYNC_DB_PATH xbmcvfs.delete(path) file = open(path, 'a+') file.close() self._build_show_table() self._build_episode_table() self._build_sync_activities() self._build_season_table() self._set_base_activites() self._refresh_activites() g.close_busy_dialog() control.showDialog.notification(g.ADDON_NAME, "Database rebuilt", time=5000)
def __init__(self, xml_file, location, actionArgs=None): try: super(BaseWindow, self).__init__(xml_file, location) except: xbmcgui.WindowXMLDialog().__init__() g.close_busy_dialog() self.canceled = False self.setProperty('texture.white', os.path.join(g.IMAGES_PATH, 'white.png')) self.setProperty('kaito.logo', os.path.join(g.IMAGES_PATH, 'trans-crow.png')) self.setProperty('kaito.fanart', g.DEFAULT_FANART) self.setProperty('settings.color', 'deepskyblue') self.setProperty('test.pattern', os.path.join(g.IMAGES_PATH, 'test_pattern.png')) self.setProperty('skin.dir', g.ADDON_DATA_PATH) if actionArgs is None: return if actionArgs.get('anilist_id'): self.item_information = ast.literal_eval( database.get_show(actionArgs['anilist_id'])['kodi_meta']) elif actionArgs.get('playnext'): self.item_information = actionArgs else: self.item_information = {} #for id, value in self.item_information['ids'].items(): self.setProperty('item.ids.%s_id' % 1, str('gh')) #for i in self.item_information['art'].keys(): self.setProperty('item.art.%s' % 'thumb', self.item_information.get('thumb')) self.setProperty('item.art.%s' % 'poster', self.item_information.get('poster')) self.setProperty('item.art.%s' % 'fanart', self.item_information.get('fanart')) self.setProperty('item.info.%s' % 'title', self.item_information.get('name')) #self.item_information['info'] = tools.clean_air_dates(self.item_information['info']) #year, month, day = self.item_information['info'].get('aired', '0000-00-00').split('-') self.setProperty('item.info.aired.year', '2018') self.setProperty('item.info.aired.month', '01') self.setProperty('item.info.aired.day', '01') try: if 'aired' in self.item_information['info']: aired_date = self.item_information['info']['aired'] aired_date = tools.datetime_workaround(aired_date) aired_date = aired_date.strftime(tools.get_region('dateshort')) self.item_information['info']['aired'] = aired_date if 'premiered' in self.item_information['info']: premiered = self.item_information['info']['premiered'] premiered = tools.datetime_workaround(premiered) premiered = premiered.strftime(tools.get_region('dateshort')) self.item_information['info']['premiered'] = premiered except: pass value = 'TBA' try: self.setProperty('item.info.%s' % 1, str('fdf')) except UnicodeEncodeError: self.setProperty('item.info.%s' % 1, 'fdf')