def get_show_data(series_title, mode = '', sitemode = '', url = ''): series_title = replace_signs(smart_unicode(series_title)) if not os.path.exists(_database.DBFILE): _database.create_db() _database.check_db_version() showdata = get_serie(series_title, mode, sitemode, url, forceRefresh = False) return showdata
def load_showlist(favored = 0): if not os.path.exists(_database.DBFILE): _database.create_db() refresh_db() elif not favored: refresh = False command = 'select distinct mode from shows order by mode' modes = _database.execute_command(command, fetchall = True) mode_list = [element[0] for element in modes] for network in get_networks(): if _addoncompat.get_setting(network.SITE) == 'true' and network.SITE not in mode_list: refresh = True if refresh: refresh_db() _database.check_db_version() command = 'select series_title, mode, submode, url, favor, hide from shows order by series_title' shows = _database.execute_command(command, fetchall = True) for series_title, mode, sitemode, url, favor, hide in shows: if _addoncompat.get_setting(mode) == False: continue elif hide is 1: continue elif favored and not favor: continue add_show(series_title, mode, sitemode, url, favor = favor, hide = hide)
def load_showlist(favored = 0): if not os.path.exists(_database.DBFILE): _database.create_db() refresh_db() elif not favored: refresh = False command = 'select distinct mode from shows order by mode' modes = _database.execute_command(command, fetchall = True) mode_list = [element[0] for element in modes] for network in get_networks(): if _addoncompat.get_setting(network.SITE) == 'true' and network.SITE not in mode_list: refresh = True if refresh: refresh_db() _database.check_db_version() command = 'select series_title, mode, submode, url, favor, hide from shows order by series_title' shows = _database.execute_command(command, fetchall = True) for series_title, mode, sitemode, url, favor, hide in shows: if _addoncompat.get_setting(mode) != 'true': continue elif hide is 1: continue elif favored and not favor: continue add_show(series_title, mode, sitemode, url, favor = favor, hide = hide)
def load_showlist(favored = 0): if not os.path.exists(_database.DBFILE): _database.create_db() refresh_db() elif not favored: refresh = False command = 'select distinct mode from shows order by mode' modes = _database.execute_command(command, fetchall = True) mode_list = [element[0] for element in modes] for network in get_networks(): if _addoncompat.get_setting(network.SITE) == 'true' and network.SITE not in mode_list: refresh = True if refresh: refresh_db() _database.check_db_version() command = "select * from shows where url <> '' and hide <> 1 and favor = ? order by series_title" shows = _database.execute_command(command, fetchall = True, values = [favored]) for show in shows: add_show( masterList = True, showdata = show)