[dash] Fix --test

Bug in adbc4ec4bb
This commit is contained in:
pukkandan 2021-12-23 03:34:18 +05:30
parent 4273cc776d
commit 4ac5b94807
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698

View file

@ -57,7 +57,7 @@ def real_download(self, filename, info_dict):
def _resolve_fragments(self, fragments, ctx): def _resolve_fragments(self, fragments, ctx):
fragments = fragments(ctx) if callable(fragments) else fragments fragments = fragments(ctx) if callable(fragments) else fragments
return [next(fragments)] if self.params.get('test') else fragments return [next(iter(fragments))] if self.params.get('test') else fragments
def _get_fragments(self, fmt, ctx): def _get_fragments(self, fmt, ctx):
fragment_base_url = fmt.get('fragment_base_url') fragment_base_url = fmt.get('fragment_base_url')