Running FileBot from the console, Groovy scripting, shell scripts, etc
forumguy
Posts: 8 Joined: 19 Aug 2016, 01:20
Post
by forumguy » 19 Aug 2016, 01:42
Hello:
I download and configured Vuze with their command runner; however, I am unable to successfully execute an AMC script using the script runner. The script works from a command line (without the %D variable). I am hoping you can assist me to get this going.
Here are the details:
Vuze version:
Filebot version:
Code: Select all
MacBook-Air:~ olivera$ filebot.sh -version
FileBot 4.7.2 (r4178) / Java(TM) SE Runtime Environment 1.8.0_25
Java version (and I think shows the $PATH is correct):
Code: Select all
MacBook-Air:~ olivera$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
My script for Vuze:
Code: Select all
filebot.sh -script fn:amc %D --output /Volumes/Data/Video/ --log-file amc.log --action copy --conflict skip -non-strict --def music=n subtitles=en artwork=n "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" "musicFormat=Music/{Artist}/{n} - {t}" "movieFormat=Movies/{n} ({y})" --db TVRage --def unsorted=y
The error from Vuze:
Code: Select all
Executing: filebot.sh -script fn:amc /Users/olivera/Documents/Vuze Downloads/slackware-14.2-iso --output /Volumes/Data/Video/ --log-file amc.log --action copy --conflict skip -non-strict --def music=n subtitles=en artwork=n "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" "musicFormat=Music/{Artist}/{n} - {t}" "movieFormat=Movies/{n} ({y})" --db TVRage --def unsorted=y
[ERROR] Unable to run "filebot.sh -script fn:amc /Users/olivera/Documents/Vuze Downloads/slackware-14.2-iso --output /Volumes/Data/Video/ --log-file amc.log --action copy --conflict skip -non-strict --def music=n subtitles=en artwork=n "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" "musicFormat=Music/{Artist}/{n} - {t}" "movieFormat=Movies/{n} ({y})" --db TVRage --def unsorted=y".
java.io.IOException: Cannot run program "filebot.sh ": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:450)
at java.lang.Runtime.exec(Runtime.java:347)
at com.aelitis.azureus.plugins.azexec.AzExecPlugin$7.run(AzExecPlugin.java:246)
at org.gudy.azureus2.pluginsimpl.local.utils.UtilitiesImpl.callWithPluginThreadContext(UtilitiesImpl.java:1105)
at org.gudy.azureus2.pluginsimpl.local.utils.UtilitiesImpl$4.run(UtilitiesImpl.java:496)
at org.gudy.azureus2.core3.util.AEThread2$threadWrapper.run(AEThread2.java:294)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 7 more
Regards,
Big fan and long time user.
rednoah
The Source
Posts: 23953 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 19 Aug 2016, 04:23
Use the absolute path to the filebot executable.
e.g.
forumguy
Posts: 8 Joined: 19 Aug 2016, 01:20
Post
by forumguy » 21 Aug 2016, 13:45
Here's the latest:
Error from Vuze after changing the executable path:
Code: Select all
Executing: /usr/local/bin/filebot.sh -script fn:amc /Users/olivera/Documents/Vuze Downloads/1914 Frank Ocean Blonde 2016 320 --output /Volumes/Data/Video/ --log-file amc.log --action copy --conflict skip -non-strict --def music=n subtitles=en artwork=n "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" "musicFormat=Music/{Artist}/{n} - {t}" "movieFormat=Movies/{n} ({y})" --db TVRage --def unsorted=y
[ERROR] Unable to run "/usr/local/bin/filebot.sh -script fn:amc /Users/oliver/Documents/Vuze Downloads/1914 Frank Ocean Blonde 2016 320 --output /Volumes/Data/Video/ --log-file amc.log --action copy --conflict skip -non-strict --def music=n subtitles=en artwork=n "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" "musicFormat=Music/{Artist}/{n} - {t}" "movieFormat=Movies/{n} ({y})" --db TVRage --def unsorted=y".
java.io.IOException: Cannot run program "/usr/local/bin/filebot.sh ": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:450)
at java.lang.Runtime.exec(Runtime.java:347)
at com.aelitis.azureus.plugins.azexec.AzExecPlugin$7.run(AzExecPlugin.java:246)
at org.gudy.azureus2.pluginsimpl.local.utils.UtilitiesImpl.callWithPluginThreadContext(UtilitiesImpl.java:1105)
at org.gudy.azureus2.pluginsimpl.local.utils.UtilitiesImpl$4.run(UtilitiesImpl.java:496)
at org.gudy.azureus2.core3.util.AEThread2$threadWrapper.run(AEThread2.java:294)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 7 more
CML output when running filebot (version):
Code: Select all
MacBook-Air:~ olivera/usr/local/bin/filebot -version
-bash: /usr/local/bin/filebot: Too many levels of symbolic links
CML output when run filebot without params:
Code: Select all
MacBook-Air:~ olivera$ /usr/local/bin/filebot.sh -
"-" is not a valid option
I think I am close and looking for some guidance to bring this across the finish line.
rednoah
The Source
Posts: 23953 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 22 Aug 2016, 01:15
1. Delete filebot. Delete those symlinks you've created. Undo whatever you did manually.
2. Use brew cask to install filebot.
@see
viewtopic.php?t=2049
forumguy
Posts: 8 Joined: 19 Aug 2016, 01:20
Post
by forumguy » 24 Aug 2016, 03:30
Done and done - Filebot 4.7.2 is fully functional.
I need assistance correcting a space being added to the target folder. Here's an example of what is being created when Command Runner executes my script (notice the space between Video and Movies)
Here's an execution from the Command Runner log:
Code: Select all
/usr/local/bin/filebot -script fn:amc "/Users/olivera/Documents/Vuze Downloads/In.the.Name.of.Ben.Hur.2016.1080p.BluRay.x264.DTS-FGT" --output /Volumes/Data/Video/ --log-file amc.log --action copy --conflict skip -non-strict --def music=n subtitles=en artwork=n "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" "musicFormat=Music/{Artist}/{n} - {t}" "movieFormat=Movies/{n} ({y})" --db TVRage --def unsorted=y
And this is the source script:
Code: Select all
/usr/local/bin/filebot -script fn:amc "%D" --output /Volumes/Data/Video/ --log-file amc.log --action copy --conflict skip -non-strict --def music=n subtitles=en artwork=n "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" "musicFormat=Music/{Artist}/{n} - {t}" "movieFormat=Movies/{n} ({y})" --db TVRage --def unsorted=y
I appreciate the assistance so far.
forumguy
Posts: 8 Joined: 19 Aug 2016, 01:20
Post
by forumguy » 24 Aug 2016, 04:17
Found the issue. I'm good for now.
rednoah
The Source
Posts: 23953 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 24 Aug 2016, 05:07
It's always nice to share your findings. What was the issue? How did you solve it? It'll help the next guy.
forumguy
Posts: 8 Joined: 19 Aug 2016, 01:20
Post
by forumguy » 27 Aug 2016, 13:06
Apologies for the quick response, the issue was an extra space after the output folder.
I guess I was tired and either accidentally added the space or just couldn't see the extra space.
Removing the space solved the issue.
forumguy
Posts: 8 Joined: 19 Aug 2016, 01:20
Post
by forumguy » 27 Aug 2016, 13:17
Just getting back to this and now trying to debug a new issue. My script produces a file not found error when my script initializes.
I copied the runtime execution from Vuze and ran it in Terminal - here's the error:
Code: Select all
/usr/local/bin/filebot -script fn:amc --output /Volumes/Data/Video/ --log-file amc.log "ut_label=Uncategorised" "ut_state=%S" "ut_title=Keanu 2016 1080p BluRay x264 DTS-JYK" "ut_kind=multi" "ut_file=" "ut_dir=/Users/olivera/Documents/Vuze-Downloads/Keanu 2016 1080p BluRay x264 DTS-JYK" --action copy --conflict skip -non-strict --def music=n subtitles=en artwork=n "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" "musicFormat=Music/{Artist}/{n} - {t}" "movieFormat=Movies/{n} ({y})" --db TVRage --def unsorted=y
Run script [fn:amc] at [Sat Aug 27 08:56:11 EDT 2016]
Parameter: music = n
Parameter: subtitles = en
Parameter: artwork = n
Parameter: seriesFormat = TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}
Parameter: musicFormat = Music/{Artist}/{n} - {t}
Parameter: movieFormat = Movies/{n} ({y})
Parameter: unsorted = y
Argument: /Users/olivera/amc.log
Argument: /Users/olivera/ut_label=Uncategorised
Argument: /Users/olivera/ut_state=%S
Argument: /Users/olivera/ut_title=Keanu 2016 1080p BluRay x264 DTS-JYK
Argument: /Users/olivera/ut_kind=multi
Argument: /Users/olivera/ut_file=
Argument: /Users/olivera/ut_dir=/Users/oliver/Documents/Vuze-Downloads/Keanu 2016 1080p BluRay x264 DTS-JYK
File not found: /Users/olivera/amc.log
Failure (°_°)
Here's the script I added to Command Runner in Vuze:
Code: Select all
/usr/local/bin/filebot -script fn:amc --output /Volumes/Data/Video/ --log-file amc.log "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" --action copy --conflict skip -non-strict --def music=n subtitles=en artwork=n "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" "musicFormat=Music/{Artist}/{n} - {t}" "movieFormat=Movies/{n} ({y})" --db TVRage --def unsorted=y
Any assistance would be appreciated.
rednoah
The Source
Posts: 23953 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 27 Aug 2016, 16:09
Some of your script parameters are specified without leading --def so they're interpreted as file arguments.