[test:download] Only extract enough videos for playlist_mincount
authordirkf <fieldhouse@gmx.net>
Mon, 6 Dec 2021 19:26:33 +0000 (19:26 +0000)
committerdirkf <fieldhouse@gmx.net>
Sat, 5 Feb 2022 02:47:21 +0000 (02:47 +0000)
test/parameters.json
test/test_download.py

index 65fd5442860f8352d83408fdeb1b69eb88ef31f8..864c9d13044fbcba9be993c59b143a35d099a64d 100644 (file)
@@ -18,7 +18,6 @@
     "noprogress": false, 
     "outtmpl": "%(id)s.%(ext)s", 
     "password": null, 
-    "playlistend": -1, 
     "playliststart": 1, 
     "prefer_free_formats": false, 
     "quiet": false, 
index ebe820dfc1990e4df6758795345375375402900b..8e43cfa1270c1b4aa6064ae77f4a31162cabf4d7 100644 (file)
@@ -121,6 +121,7 @@ def generator(test_case, tname):
         params['outtmpl'] = tname + '_' + params['outtmpl']
         if is_playlist and 'playlist' not in test_case:
             params.setdefault('extract_flat', 'in_playlist')
+            params.setdefault('playlistend', test_case.get('playlist_mincount'))
             params.setdefault('skip_download', True)
 
         ydl = YoutubeDL(params, auto_init=False)