def radiobrowser_landing(): page = vtuner.Page() page.add(vtuner.Directory('Genres', url_for('radiobrowser_genres', _external=True), len(radiobrowser.get_genre_directories()))) page.add(vtuner.Directory('Countries', url_for('radiobrowser_countries', _external=True), len(radiobrowser.get_country_directories()))) page.add(vtuner.Directory('Languages', url_for('radiobrowser_languages', _external=True), len(radiobrowser.get_language_directories()))) page.add(vtuner.Directory('Most Popular', url_for('radiobrowser_popular', _external=True), len(radiobrowser.get_stations_by_votes()))) page.set_count(4) return page.to_string()
def radiobrowser_genres(): directories = radiobrowser.get_genre_directories() return get_directories_page('radiobrowser_genre_stations', directories, request).to_string()