rename iter_search_results to either search_videos and search_gallery (closes #779)
This commit is contained in:
parent
46f94a1d78
commit
56691d7ea7
39 changed files with 52 additions and 52 deletions
|
|
@ -74,7 +74,7 @@ class Galleroob(ReplApplication):
|
|||
|
||||
self.set_formatter_header(u'Search pattern: %s' %
|
||||
pattern if pattern else u'Latest galleries')
|
||||
for backend, gallery in self.do('iter_search_results',
|
||||
for backend, gallery in self.do('search_gallery',
|
||||
pattern=pattern, max_results=self.options.count):
|
||||
self.add_object(gallery)
|
||||
self.format(gallery)
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class MainWindow(QtMainWindow):
|
|||
backend_name = str(self.ui.backendEdit.itemData(self.ui.backendEdit.currentIndex()).toString())
|
||||
|
||||
self.process = QtDo(self.weboob, self.addVideo)
|
||||
self.process.do('iter_search_results', pattern, self.ui.sortbyEdit.currentIndex(), nsfw=True, max_results=20, backends=backend_name)
|
||||
self.process.do('search_videos', pattern, self.ui.sortbyEdit.currentIndex(), nsfw=True, max_results=20, backends=backend_name)
|
||||
|
||||
def addVideo(self, backend, video):
|
||||
if not backend:
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ class Videoob(ReplApplication):
|
|||
|
||||
self.set_formatter_header(u'Search pattern: %s' % pattern if pattern else u'Latest videos')
|
||||
self.change_path('/search')
|
||||
for backend, video in self.do('iter_search_results', pattern=pattern, nsfw=self.nsfw,
|
||||
for backend, video in self.do('search_videos', pattern=pattern, nsfw=self.nsfw,
|
||||
max_results=self.options.count):
|
||||
self.add_object(video)
|
||||
self.format(video)
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class ICapGallery(IBaseCap):
|
|||
SEARCH_VIEWS,
|
||||
SEARCH_DATE) = range(4)
|
||||
|
||||
def iter_search_results(self, pattern=None, sortby=SEARCH_RELEVANCE, max_results=None):
|
||||
def search_gallery(self, pattern=None, sortby=SEARCH_RELEVANCE, max_results=None):
|
||||
"""
|
||||
Iter results of a search on a pattern. Note that if pattern is None,
|
||||
it get the latest videos.
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class ICapVideo(IBaseCap):
|
|||
SEARCH_VIEWS,
|
||||
SEARCH_DATE) = range(4)
|
||||
|
||||
def iter_search_results(self, pattern=None, sortby=SEARCH_RELEVANCE, nsfw=False, max_results=None):
|
||||
def search_videos(self, pattern=None, sortby=SEARCH_RELEVANCE, nsfw=False, max_results=None):
|
||||
"""
|
||||
Iter results of a search on a pattern. Note that if pattern is None,
|
||||
it get the latest videos.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue