]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[utils] Use in OnDemandPagedList by default
authorSergey M․ <dstftw@gmail.com>
Fri, 6 Oct 2017 16:13:53 +0000 (23:13 +0700)
committerSergey M․ <dstftw@gmail.com>
Fri, 6 Oct 2017 16:13:53 +0000 (23:13 +0700)
Not using cache results in redundant network I/O due to downloading the same pages while using --playlist-items n-m

youtube_dl/extractor/mixcloud.py
youtube_dl/extractor/nba.py
youtube_dl/utils.py

index f331db89075864c52733375c46b15fed74ef0e77..7b2bb6e20577929abb9097e2d05c13cfc141d4f9 100644 (file)
@@ -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)
index 53561961c12611eeead082ed662e44a75e38acbf..be295a7a3b010c375416e0af1a7d27337ca2d4cf 100644 (file)
@@ -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)
 
index 92b22e639b30af5e93cce69fa8c057be2cb1e0c0..59fb3343582e6dfa2aab2c6a8311300bd7458141 100644 (file)
@@ -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