adding an -o & an "%(title)s - %(id)s.%(ext)s" argument failes #14
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
if i add extra arguments to name the outputfile as i like it to become, somehow the naming argument get f*d over:
i tried adding the following commands through the config.htm-screen and directly in the config.yml file
- -o
- "%(title)s - %(id)s.%(ext)s"
this has to be capsulated in double quotes as i'm on Windows (and i'm sure Linux will go broke on it as well) as else the space behind %(title)s will cause '-' to be seen as a next commandline option which will make the full youtube-dl.exe ... command faulty
however
"%(title)s - %(id)s.%(ext)s"
becomes"\"%(title)s - %(id)s.%(ext)s\""
if i go through the config-screenand for the next downloads with that profile the file(s) get a starting and trailing # around it.
imho that somehow comes from the \ being added.
if i save it directly into the config.yml as such the double quotes get stripped on reading the file in config.go and that makes the full commandline fail for the 1st stated reason (no double quotes = spaces cause the '-' to be seen as next commandline option).
if i try to use single quotes around it making it:
'"%(title)s - %(id)s.%(ext)s"'
(singlequote, double quote ... double, single) it again excapes the double quotes on reading the configfile, resulting again in the added #'s at the start and finish of the full filename(s) e.g.: #name - id.mp4#if i try the other way around:
"'%(title)s - %(id)s.%(ext)s'"
(double quotes on the outside, single qoutes on the inside), it keeps the single quotes and strips the qouble quotes, but the resulting filename also has those single quotes at start and finishe.g.: 'name - id.mp4'
The command i hope to get (with the default and other args) is
youtube-dl.exe -o "%(title)s - %(id)s.%(ext)s" <url>
which is according to the youtube-dl readme a correct optionline
with a resulting filename:
name - id.mp4
without any # or ' around that.anyone having an idea how to tackle this?
To give you a better idea of what the correct, single quoted and escaped double quoted version result in i copy-pasted all 3 and the first 7-ish resulting outputlines in the following pastebin:
https://pastebin.com/pdjttyMv
and this is my config.html for that profile:
https://imgur.com/a/dn8nOK8
Hi @soulmaestro, gropple does not invoke the shell, so shell style escaping / quoting is unnecessary. Spaces inside arguments should be ok and the double quotes should be unnecessary. Give that a try and let me know if it works.
well damned :o
The one option that i never tried - no shell style escaping/quoting - is working 👍
the cmd.Start() - and especially the 'cmd'-part - made me think escaping/quoting was necessary.
(windows cmd vs Golang cmd variable name. )
tyvm for the quick response and preventing some of my hair to turn grey combating this what looks like a non-excisting problem/issue :)
No problem :-) I will open a separate issue to improve the documentation, because I think this is probably surprising behaviour for many people.