Rename .search() to .searchVideo, but keep the API for now

getting ready to add code to search both video and audio, but keep old
functionality intact for now
This commit is contained in:
Håvard Gulldahl 2016-01-19 10:53:10 +01:00
parent 9ca97c5fac
commit a50c9457af

View file

@ -50,7 +50,7 @@ class Library(object):
def getByKey(self, key):
return video.find_key(self.server, key)
def search(self, title, filter='all', vtype=None, **tags):
def searchVideo(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'}.
@ -65,6 +65,8 @@ class Library(object):
query = '/library/%s%s' % (filter, utils.joinArgs(args))
return video.list_items(self.server, query)
search = searchVideo # TODO: make .search() a method to merge results of .searchVideo() and .searchAudio()
def searchAudio(self, title, filter='all', atype=None, **tags):
""" Search all available audio content.
title: Title to search (pass None to search all titles).
@ -80,7 +82,6 @@ class Library(object):
query = '/library/%s%s' % (filter, utils.joinArgs(args))
return audio.list_items(self.server, query)
def cleanBundles(self):
self.server.query('/library/clean/bundles')