def genre_index(section): return with_fanart( [ {"label": g.localized, "path": plugin.url_for("by_genre", section=section, genre=g.name)} for g in sorted(Genre.all()) ] )
def by_genre(section, genre): plugin.set_content("movies") section = Section.find(section) genre = Genre.find(genre) or unicode(genre) sf = container.search_filter(section, genres=[genre]) make_search(sf)