aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-10-26 20:11:59 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-10-26 20:27:09 +0530
commit08438d2ca59fddd4147f4f957473af78d56be732 (patch)
treea6329b7a9f814b2662745ffa1096c4d00caaea5e /yt_dlp/utils.py
parent7de837a5e3e5eae92a77d07e66eda49c0e949b8d (diff)
downloadhypervideo-pre-08438d2ca59fddd4147f4f957473af78d56be732.tar.lz
hypervideo-pre-08438d2ca59fddd4147f4f957473af78d56be732.tar.xz
hypervideo-pre-08438d2ca59fddd4147f4f957473af78d56be732.zip
[outtmpl] Add type `link` for internet shortcut files
and refactor related code Closes #1405
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index be93b0ef2..9d90eca5e 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -4503,6 +4503,7 @@ OUTTMPL_TYPES = {
'description': 'description',
'annotation': 'annotations.xml',
'infojson': 'info.json',
+ 'link': None,
'pl_thumbnail': None,
'pl_description': 'description',
'pl_infojson': 'info.json',
@@ -6238,6 +6239,12 @@ URL=%(url)s
Icon=text-html
'''.lstrip()
+LINK_TEMPLATES = {
+ 'url': DOT_URL_LINK_TEMPLATE,
+ 'desktop': DOT_DESKTOP_LINK_TEMPLATE,
+ 'webloc': DOT_WEBLOC_LINK_TEMPLATE,
+}
+
def iri_to_uri(iri):
"""