diff options
author | pukkandan <pukkandan@gmail.com> | 2021-02-03 19:06:09 +0530 |
---|---|---|
committer | pukkandan <pukkandan@gmail.com> | 2021-02-05 04:11:39 +0530 |
commit | de6000d913fd35643cb6faf89919665ddd9ab225 (patch) | |
tree | 6960b6211f37df02e81189f88bdcbd3267edfcfd /youtube_dlc/utils.py | |
parent | ff88a05cff49ec1a2d6b93c0a420b63537fd6f42 (diff) | |
download | hypervideo-pre-de6000d913fd35643cb6faf89919665ddd9ab225.tar.lz hypervideo-pre-de6000d913fd35643cb6faf89919665ddd9ab225.tar.xz hypervideo-pre-de6000d913fd35643cb6faf89919665ddd9ab225.zip |
Multiple output templates for different file types
Syntax: -o common_template -o type:type_template
Types supported: subtitle|thumbnail|description|annotation|infojson|pl_description|pl_infojson
Diffstat (limited to 'youtube_dlc/utils.py')
-rw-r--r-- | youtube_dlc/utils.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/youtube_dlc/utils.py b/youtube_dlc/utils.py index be27a5622..987f4bcc0 100644 --- a/youtube_dlc/utils.py +++ b/youtube_dlc/utils.py @@ -4169,7 +4169,18 @@ def qualities(quality_ids): return q -DEFAULT_OUTTMPL = '%(title)s [%(id)s].%(ext)s' +DEFAULT_OUTTMPL = { + 'default': '%(title)s [%(id)s].%(ext)s', +} +OUTTMPL_TYPES = { + 'subtitle': None, + 'thumbnail': None, + 'description': 'description', + 'annotation': 'annotations.xml', + 'infojson': 'info.json', + 'pl_description': 'description', + 'pl_infojson': 'info.json', +} def limit_length(s, length): |