def fetch_movies(): result = {} for guid, movies in Library.all(types=['movie']).items(): movie = movies[0] result[guid] = {'movie': movie} return result
def fetch_movies(): result = {} for guid, movies in Library.all(types=['movie']).items(): movie = movies[0] result[guid] = { 'movie': movie } return result
def fetch_shows(): result = {} for guid, shows in Library.all(types=['show']).items(): show = shows[0] episodes = Library.episodes(show.rating_key, show) result[guid] = {'show': show, 'episodes': episodes} return result
def fetch_shows(): result = {} for guid, shows in Library.all(types=['show']).items(): show = shows[0] episodes = Library.episodes(show.rating_key, show) result[guid] = { 'show': show, 'episodes': episodes } return result
def library(cls, types=None, keys=None, titles=None): # Default to 'titles' filter preference if titles is None: titles, _ = get_filter('filter_sections') return Library.all(types, keys, titles)