Page 1 of 1
[REQUEST] Plugins/Scripts folder
Posted: 25 Feb 2015, 01:26
by Zignature
I'd love to have a plugins/scripts folder where one can put third party plugin scripts that could then directly be used in CLI instead of putting the path in.
e.g.
Code: Select all
filebot -script myscriptname arg1 arg2
instead of
Code: Select all
filebot -script "C:\my\path\to\myscriptname.groovy" arg1 arg2
Does that make any sense?
Re: [REQUEST] Plugins/Scripts folder
Posted: 25 Feb 2015, 02:40
by rednoah
I guess in your case it might be convenient, but I doubt it'd be used by many people, and just confuse everyone else even more.
If you want you can modify Settings.properties in the FileBot.jar and add another location like dev: or fn: for your system though.

Re: [REQUEST] Plugins/Scripts folder
Posted: 25 Feb 2015, 10:24
by Zignature
Thanks rednoah
A new challenge arrived... Finding out how to get into Filebot.jar to edit Settings.properties

Re: [REQUEST] Plugins/Scripts folder
Posted: 25 Feb 2015, 11:34
by Zignature
I think it would be a feature for CLI people. Not for GUI people.
I think GUI people don't bother checking folder structure so they won't notice

Re: [REQUEST] Plugins/Scripts folder
Posted: 25 Feb 2015, 12:11
by Zignature
Does it need to be a url or is also possible to add a local path e.g. c:\scripts ?
Re: [REQUEST] Plugins/Scripts folder
Posted: 25 Feb 2015, 12:54
by Zignature
Just found out. It needs to be a url
Re: [REQUEST] Plugins/Scripts folder
Posted: 25 Feb 2015, 13:28
by Zignature
It's a bit unwieldy but I got it done!
- Extracted Filebot.jar
- Edited "/net/filebot/Settings.properties". I added the line
Code: Select all
script.pi: http://filebot.plugins.local/%s.groovy
- Packed everything to Filebot.jar
- Made a backup of the original Filebot.jar
- Copied the newly created Filebot.jar to the Filebot directory
- Installed IIS on my Windows PC
- Created a site in IIS Management (http://filebot.plugins.local)
- Added ".groovy application/x-groovy" to the mime-types
- Created the folder "plugins" in the Filebot folder
- Copied my script to the plugins folder
- In CMD I ran
Code: Select all
filebot -script pi:sub-merge-mkv "C:\mediafolder"
And it worked!!!
I'm having a lot of fun fiddling around like this
EDIT:
Thanks to an excellent pointer (one of many) by rednoah there's no need for a webserver.
In Settings.properties just add this to Settings.properties
Code: Select all
script.pi: file:///path/to/pluginsfolder/%1.groovy
Re: [REQUEST] Plugins/Scripts folder
Posted: 25 Feb 2015, 16:00
by rednoah
You could have just used file:///C:/path/to/%s.groovy kind of URLs... no need to run a webserver

Re: [REQUEST] Plugins/Scripts folder
Posted: 25 Feb 2015, 16:17
by Zignature
Hahaha lmao. Told ya I'm a noob
But seriously, I should've caught that one.
Re: [REQUEST] Plugins/Scripts folder
Posted: 25 Feb 2015, 16:53
by Zignature
Although the script ran and did what it had to do, I got an error:
Code: Select all
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Found the solution over here:
http://www-01.ibm.com/support/docview.w ... wg21496098
Had to create a registry key
