Code: Select all
$ filebot -mediainfo . --format "[{source}] {fn}"
[BluRay] Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)
Code: Select all
$ filebot -mediainfo . --format "[{source}] {fn}"
[BluRay] Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)
Right, I should have looked closer in the log...rednoah wrote: ↑10 Jun 2019, 15:50 {source} does work for this one:Code: Select all
$ filebot -mediainfo . --format "[{source}] {fn}" [BluRay] Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)
Some shitty Featurettes messed with this one...Auto-detect movie from context: [/mnt/slow/torrents/media_downloads/Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)/Featurettes/The Costume Designs of Sharen Davis.mkv]
[HARDLINK] from [/mnt/slow/torrents/media_downloads/Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)/Django Unchained (2012) (1080p BluRay x265 Silence).mkv] to [/mnt/slow/media/Movies/Django Unchained (2012)/Django Unchained (2012) [x265, Blu-ray-1080p, AAC-5.1, KRaLiMaRKo].mkv]
[HARDLINK] from [/mnt/slow/torrents/media_downloads/Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)/Featurettes/Reimagining the Spaghetti - Western The Horses And Stunts of Django Unchained.mkv] to [/mnt/slow/media/Movies/Django Unchained (2012)/Django Unchained (2012) [x265, -1080p, AAC-2.0, ].mkv]
[OVERRIDE] Delete [/mnt/slow/media/Movies/Django Unchained (2012)/Django Unchained (2012) [x265, -1080p, AAC-2.0, ].mkv]
Code: Select all
var script = JD_HOME + '/filebotrun.sh'
var path = package.getDownloadFolder()
var name = package.getName()
var label = package.getComment() ? package.getComment() : 'N/A'
var links = package.getDownloadLinks() ? package.getDownloadLinks() : []
function isReallyFinished() {
for (var i = 0; i < links.length; i++) {
if (links[i].getArchive() != null && links[i].getExtractionStatus() != "SUCCESSFUL" || !package.isFinished()) {
return false
}
}
return true
}
if (isReallyFinished()) {
var command = [script, path, name, label, 'PACKAGE_FINISHED']
log(command)
log(callSync(command))
}
Code: Select all
#!/bin/bash
LOG="/sharedfolders/Storage/logs/amc.log"
EXC="/sharedfolders/Storage/logs/amc.txt"
SERIEN="/sharedfolders/plexroot/{plex}"
FILME="/sharedfolders/plexroot/{plex}"
USERNAME=root
HOSTS="172.17.0.1"
SCRIPT="filebot -script fn:amc --output "/sharedfolders/plexroot" --def movieformat="/sharedfolders/plexroot/{plex}" --def seriesformat="/sharedfolders/plexroot/{plex}" --action move --conflict auto -non-strict --log-file $LOG --def skipExtract=y unsorted=n music=n artwork=y --def storeReport=y --def clean=y --def plex=192.168.78.58:42Y97c6VATxkqyiNScD7 "
for HOSTNAME in ${HOSTS} ; do
sshpass -p "pwd" ssh -o StrictHostKeyChecking=no -l ${USERNAME} ${HOSTNAME} "${SCRIPT}"
done
Code: Select all
net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped org.jdownloader.extensions.eventscripter.EnvironmentException: Line 20
java.io.IOException: Cannot run program "/config/filebotrun.sh": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:215)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:201)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:196)
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:263)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at script(:20)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:275)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:167)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:147)
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:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 21 more
(#20)
at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1907)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:146)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:275)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:167)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:147)
Caused by: org.jdownloader.extensions.eventscripter.EnvironmentException: Line 20
java.io.IOException: Cannot run program "/config/filebotrun.sh": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:215)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:201)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:196)
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:263)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:275)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:167)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:147)
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:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 21 more
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:266)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
... 12 more
Caused by: java.io.IOException: Cannot run program "/config/filebotrun.sh": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:215)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:201)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:196)
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:263)
... 17 more
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:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 21 more
I ended up with the same idea in my own download setup. But when I try to schedule a task in FileBot Node docker I just get arednoah wrote: ↑12 Jun 2019, 06:57 1.
If you're stuck with docker confinement, then i recommend using JD docker and FileBot Node docker.
Then you can create a scheduled task in the FileBot Node docker and execute it via curl from the JD docker.
That'll decoupling everything, making it easy to spot and fix issues.
Code: Select all
{"success":false,"error":"NOT IMPLEMENTED"}
I see. Yes, FileBot Node certainly has value in generating CLI commands. You could always use the WebUI to generate commands and the copy & paste that into your scheduled shell script.OutrageousGem wrote: ↑17 Jun 2019, 09:37 Just because Node makes it much more convenient to rapidly test different iterations of a command and schedule it when it finally does the right thing. (I am just bad at writing shell scripts. Always some typo / unescaped character / etc....). The API Is all I currently really need.
Code: Select all
n
Code: Select all
{evaluate 'n'}
Code: Select all
{evaluate '{n}'}
Code: Select all
def scriptDir = getClass().protectionDomain.codeSource.location.path
include '$scriptDir/getEditions.groovy'
Code: Select all
AccessControlException: access denied ("java.lang.RuntimePermission" "getProtectionDomain")
Code: Select all
grant {
permission java.security.AllPermission;
};
Code: Select all
def x = 1
println '$x = 1' // $x = 1
println "$x = 1" // 1 = 1
Code: Select all
export FILEBOT_FORMAT_D="$HOME/.gdrive/FileBot Formats"
Code: Select all
_environment.FILEBOT_FORMAT_D
Code: Select all
filebot ... --def FormatFolder="$FILEBOT_FORMAT_D"
Code: Select all
{defines.FormatFolder}
Great!