[downloader:ytdl] provide 'filename' metadata (closes #291)

This commit is contained in:
Mike Fährmann
2019-05-31 14:56:45 +02:00
parent d33f5a7423
commit 6da3e21237
2 changed files with 2 additions and 1 deletions

View File

@@ -50,6 +50,8 @@ class YoutubeDLDownloader(DownloaderBase):
return self._download_video(pathfmt, info_dict) return self._download_video(pathfmt, info_dict)
def _download_video(self, pathfmt, info_dict): def _download_video(self, pathfmt, info_dict):
if "url" in info_dict:
text.nameext_from_url(info_dict["url"], pathfmt.keywords)
pathfmt.set_extension(info_dict["ext"]) pathfmt.set_extension(info_dict["ext"])
if pathfmt.exists(): if pathfmt.exists():
pathfmt.temppath = "" pathfmt.temppath = ""

View File

@@ -41,7 +41,6 @@ class ArtstationExtractor(Extractor):
player = adict["player_embedded"] player = adict["player_embedded"]
url = text.extract(player, 'src="', '"')[0] url = text.extract(player, 'src="', '"')[0]
if not url.startswith(self.root): if not url.startswith(self.root):
text.nameext_from_url(url, asset)
yield Message.Url, "ytdl:" + url, asset yield Message.Url, "ytdl:" + url, asset
continue continue