aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/__init__.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan@users.noreply.github.com>2021-01-23 17:48:12 +0530
committerpukkandan <pukkandan@gmail.com>2021-01-23 17:53:17 +0530
commit0202b52a0c0a15da6073a122aae7ed6693e18f01 (patch)
tree46a819bbb1c97649216ff0a040468a7d0d73ef29 /youtube_dlc/__init__.py
parentb8f6bbe68a6ff1f733a8d71d991b03008dfaf621 (diff)
downloadhypervideo-pre-0202b52a0c0a15da6073a122aae7ed6693e18f01.tar.lz
hypervideo-pre-0202b52a0c0a15da6073a122aae7ed6693e18f01.tar.xz
hypervideo-pre-0202b52a0c0a15da6073a122aae7ed6693e18f01.zip
#29 New option `-P`/`--paths` to give different paths for different types of files
Syntax: `-P "type:path" -P "type:path"` Types: home, temp, description, annotation, subtitle, infojson, thumbnail
Diffstat (limited to 'youtube_dlc/__init__.py')
-rw-r--r--youtube_dlc/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dlc/__init__.py b/youtube_dlc/__init__.py
index 5bf54b556..ee6120395 100644
--- a/youtube_dlc/__init__.py
+++ b/youtube_dlc/__init__.py
@@ -244,6 +244,7 @@ def _real_main(argv=None):
parser.error('Cannot download a video and extract audio into the same'
' file! Use "{0}.%(ext)s" instead of "{0}" as the output'
' template'.format(outtmpl))
+
for f in opts.format_sort:
if re.match(InfoExtractor.FormatSort.regex, f) is None:
parser.error('invalid format sort string "%s" specified' % f)
@@ -318,12 +319,12 @@ def _real_main(argv=None):
'force': opts.sponskrub_force,
'ignoreerror': opts.sponskrub is None,
})
- # Please keep ExecAfterDownload towards the bottom as it allows the user to modify the final file in any way.
- # So if the user is able to remove the file before your postprocessor runs it might cause a few problems.
+ # ExecAfterDownload must be the last PP
if opts.exec_cmd:
postprocessors.append({
'key': 'ExecAfterDownload',
'exec_cmd': opts.exec_cmd,
+ '_after_move': True
})
_args_compat_warning = 'WARNING: %s given without specifying name. The arguments will be given to all %s\n'
@@ -372,6 +373,7 @@ def _real_main(argv=None):
'listformats': opts.listformats,
'listformats_table': opts.listformats_table,
'outtmpl': outtmpl,
+ 'paths': opts.paths,
'autonumber_size': opts.autonumber_size,
'autonumber_start': opts.autonumber_start,
'restrictfilenames': opts.restrictfilenames,