MAC OS Filebot scripts

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
LeighSter
Posts: 4
Joined: 04 Oct 2014, 04:59

MAC OS Filebot scripts

Post by LeighSter »

Hi. I absolutely LOVE this program. I have a fully automated media center now thanks to you guys. It functions flawlessly but there is one little issue…
So normally I use the following script on my MacBook to move the TV shows after Vuze completion:

#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -rename /Users/Leigh/Documents/VuzeTV * --format "/Volumes/Public/Shared Videos/Cloud TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" --db thetvdb -non-strict

And that does the job. The issue is when the TV show is in a subfolder. After reading the forums I found the following about fn:renall and have installed the Groovy GVM and then tried

#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:renall /Users/Leigh/.gvm/bin/gvm-init.sh /Users/Leigh/Documents/VuzeTV * --format "/Volumes/Public/Shared Videos/Cloud TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" --db thetvdb -non-strict --action test

But I get an error:
AccessDeniedException: /Users/Leigh/Library/Saved Application State/com.adobe.flashplayer.installmanager.savedState
java.nio.file.AccessDeniedException: /Users/Leigh/Library/Saved Application State/com.adobe.flashplayer.installmanager.savedState
at net.filebot.cli.ScriptShellMethods.getMediaFolders(ScriptShellMethods.java:151)
at net.filebot.cli.ScriptShellMethods.eachMediaFolder(ScriptShellMethods.java:172)
at Script1.run(Script1.groovy:10)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:60)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:81)
at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:108)
at net.filebot.Main.main(Main.java:191)
Failure (°_°)

I have updated java:

Leighs-MacBook-Air:~ Leigh$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

So, I am a total nOOb at trying to run any kind of script. I have no programming acumen whatsoever. But I have tried as much as I could find before plaguing you guys here. I hope you can help. I appreciate it!

Thanks, Leigh.
User avatar
rednoah
The Source
Posts: 23006
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: MAC OS Filebot scripts

Post by rednoah »

1.
I don't know what GVM or where you got your info, but I'm sure you don't need it. And I'm very sure you don't wanna pass a shell script to FileBot for renaming.

2.
DO NOT pass system folders to FileBot for processing.

3.
You understand what * means? Now learn how to use it correctly.

This may or may not help @see http://www.filebot.net/forums/viewtopic.php?f=4&t=1899
:idea: Please read the FAQ and How to Request Help.
LeighSter
Posts: 4
Joined: 04 Oct 2014, 04:59

Re: MAC OS Filebot scripts

Post by LeighSter »

Thanks for the reply. I can see what you mean about the system folders now, :shock: guess that's the problem when you can't really program and try to copy paste solutions..
So now I have tried as you suggested:

#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:renall /Users/Leigh/Documents/VuzeTV * --format "/Volumes/Public/Shared Videos/Cloud TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" --db thetvdb -non-strict --action test
which gives me this error:

Leighs-MacBook-Air:~ Leigh$ #!/bin/bash
Leighs-MacBook-Air:~ Leigh$ /Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:renall /Users/Leigh/Documents/VuzeTV * --format "/Volumes/Public/Shared Videos/Cloud TV/{n}/Season {s.pad(2)}/{n} {s00e00} - {t}" --db thetvdb -non-strict --action test
AccessDeniedException: /Users/Leigh/Library/Saved Application State/com.adobe.flashplayer.installmanager.savedState
java.nio.file.AccessDeniedException: /Users/Leigh/Library/Saved Application State/com.adobe.flashplayer.installmanager.savedState
at net.filebot.cli.ScriptShellMethods.getMediaFolders(ScriptShellMethods.java:151)
at net.filebot.cli.ScriptShellMethods.eachMediaFolder(ScriptShellMethods.java:172)
at Script1.run(Script1.groovy:10)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:60)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:81)
at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:108)
at net.filebot.Main.main(Main.java:191)
Failure (°_°)

So it looks like some kind of Java issue?
I did update to the newest version and tried your suggestion from another forum with -trust-script which resulted in
"-trust-script" is not a valid option.

I don't understand your * comment.

Thanks for the help! Leigh
User avatar
rednoah
The Source
Posts: 23006
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: MAC OS Filebot scripts

Post by rednoah »

I gave you a link. Open it. Read it. Especially the trouble shooting notes.

Then check google and learn how * shell expansion works.
:idea: Please read the FAQ and How to Request Help.
Post Reply