mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 13:36:35 +00:00
Merge pull request #1017 from tcely/patch-3
Some checks failed
CI / info (push) Has been cancelled
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.8) (push) Has been cancelled
CI / test (3.9) (push) Has been cancelled
CI / containerise (push) Has been cancelled
Some checks failed
CI / info (push) Has been cancelled
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.8) (push) Has been cancelled
CI / test (3.9) (push) Has been cancelled
CI / containerise (push) Has been cancelled
Let `missing_pot` formats download after testing
This commit is contained in:
commit
cb36f44235
@ -359,6 +359,7 @@ def download_media(
|
||||
'sleep_interval': 10,
|
||||
'max_sleep_interval': min(20*60, max(60, settings.DOWNLOAD_MEDIA_DELAY)),
|
||||
'sleep_interval_requests': 1 + (2 * settings.BACKGROUND_TASK_ASYNC_THREADS),
|
||||
'extractor_args': opts.get('extractor_args', dict()),
|
||||
'paths': opts.get('paths', dict()),
|
||||
'postprocessor_args': opts.get('postprocessor_args', dict()),
|
||||
'postprocessor_hooks': opts.get('postprocessor_hooks', list()),
|
||||
@ -382,6 +383,18 @@ def download_media(
|
||||
'temp': str(temp_dir_path),
|
||||
})
|
||||
|
||||
# Allow download of formats that tested good with 'missing_pot'
|
||||
youtube_ea_dict = ytopts['extractor_args'].get('youtube', dict())
|
||||
formats_list = youtube_ea_dict.get('formats', list())
|
||||
if 'missing_pot' not in formats_list:
|
||||
formats_list += ('missing_pot',)
|
||||
youtube_ea_dict.update({
|
||||
'formats': formats_list,
|
||||
})
|
||||
ytopts['extractor_args'].update({
|
||||
'youtube': youtube_ea_dict,
|
||||
})
|
||||
|
||||
postprocessor_hook_func = postprocessor_hook.get('function', None)
|
||||
if postprocessor_hook_func:
|
||||
ytopts['postprocessor_hooks'].append(postprocessor_hook_func)
|
||||
|
Loading…
Reference in New Issue
Block a user