summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2017-10-06 23:13:53 +0700
committerSergey M․ <[email protected]>2017-10-06 23:13:53 +0700
commit6be08ce60205a65a6739667783eead56ccc34456 (patch)
tree2b06886066bc033dde8a863606bef20a81929f53
parentcf5f6ed5be8bab252f3ded345b6b1fdf31426661 (diff)
downloadyoutube-dl-6be08ce60205a65a6739667783eead56ccc34456.tar.gz
youtube-dl-6be08ce60205a65a6739667783eead56ccc34456.zip
[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
-rw-r--r--youtube_dl/extractor/mixcloud.py2
-rw-r--r--youtube_dl/extractor/nba.py2
-rw-r--r--youtube_dl/utils.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/mixcloud.py b/youtube_dl/extractor/mixcloud.py
index f331db890..7b2bb6e20 100644
--- a/youtube_dl/extractor/mixcloud.py
+++ b/youtube_dl/extractor/mixcloud.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)
diff --git a/youtube_dl/extractor/nba.py b/youtube_dl/extractor/nba.py
index 53561961c..be295a7a3 100644
--- a/youtube_dl/extractor/nba.py
+++ b/youtube_dl/extractor/nba.py
@@ -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)
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 92b22e639..59fb33435 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -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