def search(self, title, filter='all', vtype=None, **tags): """ Search all available content. title: Title to search (pass None to search all titles). filter: One of {'all', 'onDeck', 'recentlyAdded'}. videotype: One of {'movie', 'show', 'season', 'episode'}. tags: One of {country, director, genre, producer, actor, writer}. """ args = {} if title: args['title'] = title if vtype: args['type'] = video.search_type(vtype) for tag, obj in tags.iteritems(): args[tag] = obj.id query = '/library/%s%s' % (filter, utils.joinArgs(args)) return video.list_items(self.server, query)
def search(self, title, filter='all', vtype=None, **tags): """ Search section content. title: Title to search (pass None to search all titles). filter: One of {'all', 'newest', 'onDeck', 'recentlyAdded', 'recentlyViewed', 'unwatched'}. videotype: One of {'movie', 'show', 'season', 'episode'}. tags: One of {country, director, genre, producer, actor, writer, decade, year, contentRating, <etc>}. """ args = {} if title: args['title'] = title if vtype: args['type'] = video.search_type(vtype) for tag, obj in tags.items(): args[tag] = obj.id query = '/library/sections/%s/%s%s' % (self.key, filter, utils.joinArgs(args)) return video.list_items(self.server, query)