I just integrated filebot AMC with Deluge, and it works great!
There's just one problem: I'm trying to process downloaded files with an encoding script, but since the exec part of the AMC script get's the filename and path from the rename log, spaces are not escaped.
Is there an easy way to escape the whole string (file:to), or to add double quotes at the beginning and end?
Cheers
PS I've already added quotes to the script calling amc.groovy, but obviously that doesn't work.
--def "exec=autsmuxer.sh "{file}""
AMC --def exec - filename not escaped under linux
Re: AMC --def exec - filename not escaped under linux
Double quotes inside of double quotes? That doesn't work, plenty of explanation in the amc docs:
Backslash might work, or you play with mixing single and double quotes, it's all on google:
Code: Select all
--def "exec=autsmuxer.sh "{file}""
Code: Select all
--def "exec=autsmuxer.sh \"{file}\""
Re: AMC --def exec - filename not escaped under linux
Thanks a lot, I'm one step closer
Got a lot to learn about java ...
While it all seems correct, I'm now getting a file not found error.
Example:
Execute: autsmuxer.sh "/mnt/TVShows/Series Name - 1x01 - With Spaces.mkv"
IOException: java.io.IOException: error=2, No such file or directory
java.io.IOException: java.io.IOException: error=2, No such file or directory
at Script2.execute(Script2.groovy:149)
at Script3$_run_closure31.doCall(Script3.groovy:229)
at Script3.run(Script3.groovy:226)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (°_°)
Running
autsmuxer.sh "/mnt/TVShows/Series Name - 1x01 - With Spaces.mkv"
from the command prompt works just fine.
I googled and read a lot of tutorials and articles, but I can't find a solution.
What could be the problem here? The script isn't, calling filebot without an input file executes the script just fine. Must be the filename.
Cheers

While it all seems correct, I'm now getting a file not found error.
Example:
Execute: autsmuxer.sh "/mnt/TVShows/Series Name - 1x01 - With Spaces.mkv"
IOException: java.io.IOException: error=2, No such file or directory
java.io.IOException: java.io.IOException: error=2, No such file or directory
at Script2.execute(Script2.groovy:149)
at Script3$_run_closure31.doCall(Script3.groovy:229)
at Script3.run(Script3.groovy:226)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (°_°)
Running
autsmuxer.sh "/mnt/TVShows/Series Name - 1x01 - With Spaces.mkv"
from the command prompt works just fine.
I googled and read a lot of tutorials and articles, but I can't find a solution.
What could be the problem here? The script isn't, calling filebot without an input file executes the script just fine. Must be the filename.
Cheers
Re: AMC --def exec - filename not escaped under linux
Might not be working on Linux with FileBot 3.6, grab the latest beta and it should work. Read FAQ for how to get the latest jar.
Re: AMC --def exec - filename not escaped under linux
Thanks a lot, I'll give it a try.
Re: AMC --def exec - filename not escaped under linux
I tried with latest Filebot, the result is different, but it still doesn't work.
Now I get:
Execute: autsmuxer.sh "/mnt/TVShows/Series Name - 1x01 - With Spaces.mkv"
Input file: Spaces.mkv" not found.
Maybe there's a way to escape white spaces, brackets etc. in the file path?
Cheers
Now I get:
Execute: autsmuxer.sh "/mnt/TVShows/Series Name - 1x01 - With Spaces.mkv"
Input file: Spaces.mkv" not found.
Maybe there's a way to escape white spaces, brackets etc. in the file path?
Cheers
Re: AMC --def exec - filename not escaped under linux
Is this an error message of autsmuxer.sh?
No idea why quotes would not be escaped. Works fine on Windows and should work on Linux just the same.
EDIT:
Try creating a new groovy script:
EDIT2:
Or maybe single-quotes work better on unix?
EDIT3:
Looks like it doesn't work in the first place. Not possible for now.
http://groovy.codehaus.org/Executing+Ex ... rom+Groovy
Code: Select all
Input file: Spaces.mkv" not found.
EDIT:
Try creating a new groovy script:
Code: Select all
'''autsmuxer.sh "/mnt/TVShows/Series Name - 1x01 - With Spaces.mkv"'''.execute()
Or maybe single-quotes work better on unix?
EDIT3:
Looks like it doesn't work in the first place. Not possible for now.
http://groovy.codehaus.org/Executing+Ex ... rom+Groovy
Re: AMC --def exec - filename not escaped under linux
Fantastic, now it works!
Thanks a lot!!
Thanks a lot!!