stop search queries if there is no more results
This commit is contained in:
parent
4840dff989
commit
be1204af48
1 changed files with 3 additions and 0 deletions
|
|
@ -151,6 +151,9 @@ class YoutubeBackend(BaseBackend, ICapVideo, ICapCollection):
|
||||||
if nb_yielded == max_results:
|
if nb_yielded == max_results:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if nb_yielded < query_max_results:
|
||||||
|
return
|
||||||
|
|
||||||
def latest_videos(self):
|
def latest_videos(self):
|
||||||
return self.search_videos(None, ICapVideo.SEARCH_DATE)
|
return self.search_videos(None, ICapVideo.SEARCH_DATE)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue