浏览代码

[test:download] Only extract enough videos for playlist_mincount

dirkf 3 年之前
父节点
当前提交
73e1ab6125
共有 2 个文件被更改,包括 1 次插入1 次删除
  1. 0 1
      test/parameters.json
  2. 1 0
      test/test_download.py

+ 0 - 1
test/parameters.json

@@ -18,7 +18,6 @@
     "noprogress": false, 
     "noprogress": false, 
     "outtmpl": "%(id)s.%(ext)s", 
     "outtmpl": "%(id)s.%(ext)s", 
     "password": null, 
     "password": null, 
-    "playlistend": -1, 
     "playliststart": 1, 
     "playliststart": 1, 
     "prefer_free_formats": false, 
     "prefer_free_formats": false, 
     "quiet": false, 
     "quiet": false, 

+ 1 - 0
test/test_download.py

@@ -121,6 +121,7 @@ def generator(test_case, tname):
         params['outtmpl'] = tname + '_' + params['outtmpl']
         params['outtmpl'] = tname + '_' + params['outtmpl']
         if is_playlist and 'playlist' not in test_case:
         if is_playlist and 'playlist' not in test_case:
             params.setdefault('extract_flat', 'in_playlist')
             params.setdefault('extract_flat', 'in_playlist')
+            params.setdefault('playlistend', test_case.get('playlist_mincount'))
             params.setdefault('skip_download', True)
             params.setdefault('skip_download', True)
 
 
         ydl = YoutubeDL(params, auto_init=False)
         ydl = YoutubeDL(params, auto_init=False)