youtube-dl: fix 'Error in output template: unsupported format character' when title contains dollar or percent
We pass the filename to YoutubeDL as the outtmpl parameter, which is used as a string template. See YoutubeDL.py, line 711: filename = expand_path(outtmpl).replace(sep, '') % template_dict
This commit is contained in:
parent
9721620cec
commit
120e01fbed
1 changed files with 3 additions and 1 deletions
|
@ -290,7 +290,9 @@ class gPodderYoutubeDL(download.CustomDownloader):
|
|||
|
||||
def fetch_video(self, url, tempname, reporthook):
|
||||
opts = {
|
||||
'outtmpl': tempname, # use given tempname by DownloadTask
|
||||
# outtmpl: use given tempname by DownloadTask
|
||||
# (escape % and $ because outtmpl used as a string template by youtube-dl)
|
||||
'outtmpl': tempname.replace('%', '%%').replace('$', '$$'),
|
||||
'nopart': True, # don't append .part (already .partial)
|
||||
'retries': 3, # retry a few times
|
||||
'progress_hooks': [reporthook] # to notify UI
|
||||
|
|
Loading…
Reference in a new issue