[REQUEST] Plugins/Scripts folder

All your suggestions, requests and ideas for future development
Post Reply
Zignature
Power User
Posts: 48
Joined: 19 Feb 2015, 11:33

[REQUEST] Plugins/Scripts folder

Post 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?
User avatar
rednoah
The Source
Posts: 23931
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [REQUEST] Plugins/Scripts folder

Post 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. ;)
:idea: Please read the FAQ and How to Request Help.
Zignature
Power User
Posts: 48
Joined: 19 Feb 2015, 11:33

Re: [REQUEST] Plugins/Scripts folder

Post by Zignature »

Thanks rednoah :)

A new challenge arrived... Finding out how to get into Filebot.jar to edit Settings.properties 8-)
Zignature
Power User
Posts: 48
Joined: 19 Feb 2015, 11:33

Re: [REQUEST] Plugins/Scripts folder

Post 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 :P
Zignature
Power User
Posts: 48
Joined: 19 Feb 2015, 11:33

Re: [REQUEST] Plugins/Scripts folder

Post by Zignature »

Does it need to be a url or is also possible to add a local path e.g. c:\scripts ?
Zignature
Power User
Posts: 48
Joined: 19 Feb 2015, 11:33

Re: [REQUEST] Plugins/Scripts folder

Post by Zignature »

Just found out. It needs to be a url
Zignature
Power User
Posts: 48
Joined: 19 Feb 2015, 11:33

Re: [REQUEST] Plugins/Scripts folder

Post by Zignature »

It's a bit unwieldy but I got it done!
  1. Extracted Filebot.jar
  2. Edited "/net/filebot/Settings.properties". I added the line

    Code: Select all

    script.pi: http://filebot.plugins.local/%s.groovy
  3. Packed everything to Filebot.jar
  4. Made a backup of the original Filebot.jar
  5. Copied the newly created Filebot.jar to the Filebot directory
  6. Installed IIS on my Windows PC
  7. Created a site in IIS Management (http://filebot.plugins.local)
  8. Added ".groovy application/x-groovy" to the mime-types
  9. Created the folder "plugins" in the Filebot folder
  10. Copied my script to the plugins folder
  11. 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 :D

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
Last edited by Zignature on 25 Feb 2015, 16:59, edited 2 times in total.
User avatar
rednoah
The Source
Posts: 23931
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [REQUEST] Plugins/Scripts folder

Post by rednoah »

You could have just used file:///C:/path/to/%s.groovy kind of URLs... no need to run a webserver ;)
:idea: Please read the FAQ and How to Request Help.
Zignature
Power User
Posts: 48
Joined: 19 Feb 2015, 11:33

Re: [REQUEST] Plugins/Scripts folder

Post by Zignature »

Hahaha lmao. Told ya I'm a noob :P

But seriously, I should've caught that one.
Last edited by Zignature on 25 Feb 2015, 16:54, edited 1 time in total.
Zignature
Power User
Posts: 48
Joined: 19 Feb 2015, 11:33

Re: [REQUEST] Plugins/Scripts folder

Post 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 :)
Post Reply