[common] pass valid filename in download_url_ffmpeg

This commit is contained in:
Mort Yao 2016-12-03 17:40:29 +01:00
parent 8e150e6989
commit 474f4d724a
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -968,11 +968,15 @@ def download_url_ffmpeg(url,title, ext,params={}, total_size=0, output_dir='.',
from .processor.ffmpeg import has_ffmpeg_installed, ffmpeg_download_stream from .processor.ffmpeg import has_ffmpeg_installed, ffmpeg_download_stream
assert has_ffmpeg_installed(), "FFmpeg not installed." assert has_ffmpeg_installed(), "FFmpeg not installed."
global output_filename global output_filename
if(output_filename): if output_filename:
dotPos = output_filename.rfind(".") dotPos = output_filename.rfind(".")
title = output_filename[:dotPos] title = output_filename[:dotPos]
ext = output_filename[dotPos+1:] ext = output_filename[dotPos+1:]
title = tr(get_filename(title))
ffmpeg_download_stream(url, title, ext, params, output_dir) ffmpeg_download_stream(url, title, ext, params, output_dir)
def playlist_not_supported(name): def playlist_not_supported(name):