mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-18 08:16:10 +00:00
[test] pl_counts
This commit is contained in:
parent
ffccff1a1f
commit
3a31e52d27
1 changed files with 4 additions and 2 deletions
|
@ -123,8 +123,10 @@ 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')
|
||||
if traverse_obj(test_case, 'playlist_count', 'playlist_maxcount', default=-1) < 0:
|
||||
params.setdefault('playlistend', test_case.get('playlist_mincount'))
|
||||
# only process enough items for specified tests
|
||||
pl_counts = traverse_obj(test_case, (None, ('playlist_count', 'playlist_mincount', 'playlist_maxcount')))
|
||||
if pl_counts:
|
||||
params.setdefault('playlistend', max(pl_counts) + 1)
|
||||
params.setdefault('skip_download', True)
|
||||
|
||||
ydl = YoutubeDL(params, auto_init=False)
|
||||
|
|
Loading…
Reference in a new issue