[JDownloader] Setup for Windows, Linux and macOS

Running FileBot from the console, Groovy scripting, shell scripts, etc
Locked
User avatar
rednoah
The Source
Posts: 23694
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[JDownloader] Setup for Windows, Linux and macOS

Post by rednoah »

Welcome to the official JDownloader help & support topic!


Automated Media Center

This guide will help you with setting up the amc script with JDownloader. We'll add our own Event Scripter event script, which passes some arguments along to our shell script, which then calls filebot as usual.
  1. Install the Event Scripter plugin
  2. Add the Execute FileBot (PackageFinished) script
  3. Add the Execute FileBot (ArchiveExtracted) script
  4. Download the jdownloader-postprocess.sh (i.e. Linux and macOS) or jdownloader-postprocess.cmd (i.e. Windows) script, make sure it's executable, and place it in the JD_HOME folder.

:idea: The jdownloader-postprocess.sh script location is set in the first line:

JavaScript: Select all

var script = '/path/to/jdownloader-postprocess.sh'

:idea: You may edit the configuration files directly if you are running JDownloader on a headless server:
org.jdownloader.extensions.eventscripter.EventScripterExtension.scripts.json




Running JDownloader in a Docker Container

If you are using the jlesage/docker-jdownloader-2 docker container (or any other JD docker container) then this container will not be able to call filebot as filebot is not installed on OS running inside the container. Remember that each container is effectively a separate machine for all accounts and purposes, and one machine cannot just call commands on another. You can instead run a JD container and a FileBot Node container, and have former send HTTP requests to the latter over the local network to then run filebot commands in response. Please read Remote Command Execution for details.
  1. Install the Event Scripter plugin
  2. Add the Execute FileBot via FileBot Node (PackageFinished) script
  3. Add the Execute FileBot via FileBot Node (ArchiveExtracted) script
  4. The FileBot Node network address is set in the first line:

    JavaScript: Select all

    var node = 'http://username:[email protected]:5452/command'
    



Known Issues

  • The PackageFinished script is called before extraction is complete. The ArchiveExtracted script is called for each individual archive. In order to avoid FileBot processing partially extracted files it is recommended that extraction is disabled in JDownloader and enabled in FileBot via the --def skipExtract=n option.


If something is not working, please read Shell Script Debugging for Beginners and make sure it's not a simple $PATH or permission issue.
:idea: Please read the FAQ and How to Request Help.
Locked