def get_show_list(): #types: 0 = normal, 1 = hq, 2 = ignored, 3 = hq ignored shows = [] for show in db_query('select * from shows order by name'): type = 1 if show['hq'] == 1 else 0 if show['ignore'] == 1: type += 2 shows.append({'name': show['name'], 'type': type, 'id': show['id']}) return shows
def nextshows(day=""): if not sess.mysched or not sess.myep: abort(403) if day == "today": shows = sess.myep.get_dayShows("today") else: shows = sess.myep.get_dayShows() # tomorrow ig_shows = [show[0] for show in db_query('select name from shows where ignore="1"')] shows = [x for x in shows if x["showname"] not in ig_shows and not x["aquired"]] return render_template("home_nextshows.html", shows=shows)
def shows(showid): info = db_query('select * from shows where id=? limit 1', [showid], one=True) shows = get_show_list() return render_template('shows_shows.html', shows=shows, info=info)