Open Emasoft opened 1 year ago
It's very difficult to parse all possible combinations of quotes. a-Shell uses a minimalist parser that goes from one quote to the next unescaped quote. In your case, 'title=You\'re Going to Miss It - Harry Gregson-Williams'
would (very likely) work. Using a curly apostrophe, such as ‘
would also work.
If you really need the full command parsing with all possible quotes, you can start dash
inside a-Shell. It has the full command line parsing.
I see at the end that these commands are created automatically by yt-dlp
, so you don't necessarily have an easy way to change the way they are written. I'll see if I can change the way the quotes are being parsed, so closing quote + no espace after is not the end of the argument.
I just discovered that yt-dlp returns error if I try to specify the subtitles languages to embed in a video. The error from yt-dlp and ffmpeg is:
error ValueError('Wrong regex for subtitlelangs: *')
But the string I used as parameter was:
'subtitleslangs': 'en.*,it.*,fr.*,ja.*,zh.*,-live_chat'
I tried various combinations, but it seems that selecting the languages for the subtitles in yt-dlp always returns an error.
This won't apply to this scenario, but for some scenarios with yt-dlp this limitation may avoided by using the argument --restrict-filenames
which will convert something like 'SHOUTOUT TO MY COUSIN'"'"'S KID [asdfghjkl].mp4'
to 'SHOUTOUT_TO_MY_COUSIN_S_KID-[asdfghjkl].mp4'
I've found a strange issue on a-Shell when using ffmpeg. This command:
Is not parsed correctly by a-Shell, and returns the following ERROR:
It seems the escaping is not parsed correctly by the shell.
'"'"'
is the correct escaping for'
on UNIX. But a-Shell parses it wrong, and"
ends being left out.Moreover: this bug in the parsing code for escaping characters can cause a-Shell to crash. Here is a command that ALWAYS crashes a-Shell (at least on my iPad):
And this command is just a shortened version of the one above.
Also, those kind of commands are usually emitted by youtube-dl and yt-dlp (this is where I got them) for postprocessing videos. And this bug seems to make both programs crash with ERROR. No such crash happens on my Debian machine. In other words, at the moment many youtube URLs (all those with titles that need escaping) cannot be passed to those programs in a-Shell (unless you disable the postprocessing options).
You can reproduce the issue in yt-dlp with the following command:
And if you need the verbose output:
What do you think?