Everything I have read on these forums indicate that the quotes should be escaping properly. However, the script seems to be hanging/breaking on the &. Relevant logs:
Parameter: exec = curl -d "eventType=Manual
...
Execute: curl -d "eventType=Manual
curl : Invalid URI: The hostname could not be parsed.
At line:1 char:1
+ curl -d eventType=Manual
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], UriFormatException
+ FullyQualifiedErrorId : System.UriFormatException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Done ?(?????)?
'filepath' is not recognized as an internal or external command,
operable program or batch file.
I have checked and if I pull out the command as it should be parsed it works correctly outside of the filebot script. Would greatly appreciate your assistance rednoah.
Adding curl.exe does send the correct exec command through. Thanks for that. However the argument is still interrupting at the &. I did also notice that there seems to be spaces inserted around that ampersand when the batch files run.
Execute: curl.exe -d "eventType=Manual
curl: no URL specified!
curl: try 'curl --help' for more information
Done ?(?????)?
'filepath' is not recognized as an internal or external command,
operable program or batch file.
Last edited by english06 on 27 Jan 2019, 00:34, edited 1 time in total.
Changing the inner double quotes to single quotes took care of the ampersand issue. However now the {plex} variable is not working correctly and is being ignored.
Edit: So after reviewing it seems {plex} and {n} will not pass correctly into the exec. My question then becomes how to specify series name for TV Shows. My movies script works fine since {fn} is the same as the folder name. However, TV shows w/ S00E00 obviously won't work in the same manner.
Parameter: exec = echo {quote plex}
...
Execute: echo 'TV Shows/Alias/Season 01/Alias - S01E01 - Truth Be Told'
TV Shows/Alias/Season 01/Alias - S01E01 - Truth Be Told
...
If you wanna perform some action on a newly processed file remotely, then using {f} is the only viable parameter, since {plex} is not exactly the output file path. You can do something like this to take the Windows path and translate it to the server-side Unix path:
FileBot 4.8.4 (r5829)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-01-16 (r540)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 10.0.2
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 972 MB Max Memory / 35 MB Used Memory
OS: Windows 10 (amd64)
Package: APPX
License: Microsoft Store License
Done ?(?????)?
As for the script {f} was not pulling any information (similar to previous issue), but changing that to {file} did the trick to pull in the partial path name. However, the "replace" script is erroring the script. Appropriate log lines from failure:
SyntaxError: unexpected char: '\'
javax.script.ScriptException: SyntaxError: unexpected char: '\'
at net.filebot.format.ExpressionFormat.compile(ExpressionFormat.java:85)
at net.filebot.format.ExpressionFormat.<init>(ExpressionFormat.java:43)
at net.filebot.cli.ScriptShellBaseClass.getMediaInfo(ScriptShellBaseClass.java:237)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at Script1$_run_closure56.doCall(Script1.groovy:529)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at Script1.run(Script1.groovy:529)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:64)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:154)
at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:36)
at net.filebot.Main.main(Main.java:127)
Failure (°_°)
A typical mistake. Please read the Escape Arguments section to understand what's going on and how to fix to argument so that you pass the value you want to pass: viewtopic.php?f=4&t=1899
You may want to consider using the @file syntax for reading command-line arguments from external text files, so you don't have to worry about how PowerShell / Shell argument passing works.