Browse Source
[utils] Use in OnDemandPagedList by default
Not using cache results in redundant network I/O due to downloading the same pages while using --playlist-items n-m
master
Sergey M․
7 years ago
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
3 changed files with
3 additions and
3 deletions
-
youtube_dl/extractor/mixcloud.py
-
youtube_dl/extractor/nba.py
-
youtube_dl/utils.py
|
|
@ -291,7 +291,7 @@ class MixcloudUserIE(MixcloudPlaylistBaseIE): |
|
|
|
functools.partial( |
|
|
|
self._tracks_page_func, |
|
|
|
'%s/%s' % (user_id, list_type), video_id, 'list of %s' % list_type), |
|
|
|
self._PAGE_SIZE, use_cache=True) |
|
|
|
self._PAGE_SIZE) |
|
|
|
|
|
|
|
return self.playlist_result( |
|
|
|
entries, video_id, '%s (%s)' % (username, list_type), description) |
|
|
|
|
|
@ -122,7 +122,7 @@ class NBAIE(TurnerBaseIE): |
|
|
|
playlist_title = self._og_search_title(webpage, fatal=False) |
|
|
|
entries = OnDemandPagedList( |
|
|
|
functools.partial(self._fetch_page, team, video_id), |
|
|
|
self._PAGE_SIZE, use_cache=True) |
|
|
|
self._PAGE_SIZE) |
|
|
|
|
|
|
|
return self.playlist_result(entries, team, playlist_title) |
|
|
|
|
|
|
|
|
|
@ -1933,7 +1933,7 @@ class PagedList(object): |
|
|
|
|
|
|
|
|
|
|
|
class OnDemandPagedList(PagedList): |
|
|
|
def __init__(self, pagefunc, pagesize, use_cache=False): |
|
|
|
def __init__(self, pagefunc, pagesize, use_cache=True): |
|
|
|
self._pagefunc = pagefunc |
|
|
|
self._pagesize = pagesize |
|
|
|
self._use_cache = use_cache |
|
|
|