summaryrefslogtreecommitdiffstats
path: root/gallery_dl/downloader
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-08-16 07:00:33 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-08-16 07:00:33 -0400
commit3d18761f620a294ea6c5bff13c5994b93b29f3ed (patch)
tree092fa6f8128bc187512be532801670417f215986 /gallery_dl/downloader
parenta6e995c093de8aae2e91a0787281bb34c0b871eb (diff)
New upstream version 1.30.3.upstream/1.30.3
Diffstat (limited to 'gallery_dl/downloader')
-rw-r--r--gallery_dl/downloader/ytdl.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gallery_dl/downloader/ytdl.py b/gallery_dl/downloader/ytdl.py
index 69a59ff..9659782 100644
--- a/gallery_dl/downloader/ytdl.py
+++ b/gallery_dl/downloader/ytdl.py
@@ -109,7 +109,11 @@ class YoutubeDLDownloader(DownloaderBase):
def _download_video(self, ytdl_instance, pathfmt, info_dict):
if "url" in info_dict:
- text.nameext_from_url(info_dict["url"], pathfmt.kwdict)
+ if "filename" in pathfmt.kwdict:
+ pathfmt.kwdict["extension"] = \
+ text.ext_from_url(info_dict["url"])
+ else:
+ text.nameext_from_url(info_dict["url"], pathfmt.kwdict)
formats = info_dict.get("requested_formats")
if formats and not compatible_formats(formats):