POSTBUCKET - where random posts in unrelated topics go

Any questions? Need some help?
absoluthamburg
Posts: 1
Joined: 30 May 2019, 13:07

Re: [Mac] Folder Action with Automator

Post by absoluthamburg »

Hi there

just a small question regarding the quick action "rename with filebot". It works great overall but how I can change the language of the pulled title. In filebot it self I pull the German name but via the quick action it pulls the English name.

It is possible to change the language of the quick action?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Mac] Folder Action with Automator

Post by rednoah »

Yes, you can open the .workflow after installing the action to modify the command and add the --lang option.
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: [DOCS] FileBot Groovy Expression References

Post by devster »

Pardon my nosiness, how do you generate these pages?
They're a real eye opener, for example I had no idea String.match() could accept a map.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DOCS] FileBot Groovy Expression References

Post by rednoah »

The FileBot API Documentation is generated from the source using the javadoc tool.
:idea: Please read the FAQ and How to Request Help.
redbull666
Donor
Posts: 58
Joined: 08 Jan 2014, 20:45

Re: MediaInfo Inspector

Post by redbull666 »

Lately I am seeing more releases of which I cannot seem to get a useful {source} extracted.

Example 1 (OK): https://paste.gg/p/anonymous/f8d52f198a ... d6402ffae3 (seen in the BluRay-1080p tag)
Example 2 (not OK) https://paste.gg/p/anonymous/8691f9399e ... 949c3ebbf2 (see the -2160p tag)

I wonder why 1 works, and not 2. What is different exactly?

I updated Mediainfo to the repo provided by Mediainfo, but that was after, not sure that helps.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: MediaInfo Inspector

Post by rednoah »

{source} is not a MediaInfo binding. {source} is based primary on the filename, i.e. if the filename contains BluRay then {source} will be BluRay, if the filename is abc.mp4 then {source} will be undefined.
:idea: Please read the FAQ and How to Request Help.
redbull666
Donor
Posts: 58
Joined: 08 Jan 2014, 20:45

Re: MediaInfo Inspector

Post by redbull666 »

rednoah wrote: 09 Jun 2019, 07:37 {source} is not a MediaInfo binding. {source} is based primary on the filename, i.e. if the filename contains BluRay then {source} will be BluRay, if the filename is abc.mp4 then {source} will be undefined.
Aaah ok, still I did not get a valid source from the release with this filename:

Django Unchained (2012) (1080p BluRay x265 HEVC 10bit AAC 5.1 Silence)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: MediaInfo Inspector

Post by rednoah »

{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)
:idea: Please read the FAQ and How to Request Help.
redbull666
Donor
Posts: 58
Joined: 08 Jan 2014, 20:45

Re: MediaInfo Inspector

Post by redbull666 »

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)
Right, I should have looked closer in the log...
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]
Some shitty Featurettes messed with this one...

Thanks for the help!
chimera
Posts: 3
Joined: 12 Jun 2019, 06:25

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by chimera »

Hi Rednoah,

after some hours of troubleshooting I have a question and would appreciate your help.

My setup is a OMV Host that runs a jdownloader docker instance. Filebot is installed on the OMV host.
The filebot script itself runs fine. I needed a way to call the filebot script, so I came up with a sshpass script from the docker instance which logs into the OMV instance to start the filebot script.
The only thing that is currently not working is calling the script from jdownloader, it always gives error code 2: file or directory not found.
After searching I ruled out the most obvious mistakes:

- The script, filebotrun.sh has chmod 777 and executable
- Has unix EOL encoding
- Within the jdownloader docker instance on bash, I can execute the shell script successfully but not from jdownloader itself (path is varied from jdownloader GUI, i can see the filebotrun.sh, so in theory file level access is given

Can you think of any reason why the docker jdownloader instance cannot access the shell script?
Thank you in advance for your help

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))
}

Shell script filebotrun.sh:

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

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by rednoah »

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.


2.
Is your *.sh script ever called by JD at all? If no, what does the JD log say? If yes, what does the output say?
:idea: Please read the FAQ and How to Request Help.
chimera
Posts: 3
Joined: 12 Jun 2019, 06:25

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by chimera »

Wow, thanks for quick reply.
I'll will check the Filebot node docker, thank you.

Below is the error from the log, even when I validate the script in the jdownloader GUI it says no file or directory but I rly dont get it.

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
chimera
Posts: 3
Joined: 12 Jun 2019, 06:25

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by chimera »

Hey Rednoah,

after looking at Filebot node, I would just use the filebot watcher to monitor my jdownloader extraction destination folders and go via amc from there.
That is way easier than I thought in comparison to my sshpass approach between containers lool ;-)

Impressive work btw, thank you for the tools mate!
leejk
Posts: 30
Joined: 03 Oct 2015, 04:18

Re: FileBot on the Mac App Store

Post by leejk »

Hi,

I have the MAS version, and previously I had install the Homebrew version installed as well in order to run scripts. However I had to uninstall/reinstall Homebrew, but now the Homebrew version wants a license. Has there been a change in the license policy?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot on the Mac App Store

Post by rednoah »

Yes, FileBot is now available independently of any App Store:
viewtopic.php?f=9&t=6265

You can request a complimentary license if you need to work around Apple limitations:
viewtopic.php?f=8&t=9517
:idea: Please read the FAQ and How to Request Help.
OutrageousGem
Posts: 11
Joined: 12 Apr 2019, 06:20

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by OutrageousGem »

rednoah 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.
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 a

Code: Select all

{"success":false,"error":"NOT IMPLEMENTED"}
I doubt you would recommend unimplemented features. Any idea what might be going wrong?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by rednoah »

Ups. Looks like this feature is only enabled for SYNO and QNAP builds even though it probably would work for docker too. I guess it's not as easy as I thought with the current release. I'll see what I can do for the next release.
:idea: Please read the FAQ and How to Request Help.
OutrageousGem
Posts: 11
Joined: 12 Apr 2019, 06:20

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by OutrageousGem »

Ah. I will hope for the next release then. Thank you.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by rednoah »

I've update the FileBot Node docker container to FileBot Node 0.2.8.4. Please try the latest container and let me know if you encounter any problems.
:idea: Please read the FAQ and How to Request Help.
OutrageousGem
Posts: 11
Joined: 12 Apr 2019, 06:20

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by OutrageousGem »

Works great. Thank you! Two questions though:

1, Is it possible to somehow un-schedule a task? Can not find that option.

2, Is there any way to also schedule it to run at a specified time? Currently only a API call seems possible.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by rednoah »

1.
Yes, but only by directly modifying the FileBot Node application data files, which are stored in /data/.filebot-node (container-point-of-view).


2.
FileBot Node does not include a scheduler. The scheduling of commands is best done with the built-in facilities of the platform, i.e. cron if you're using a generic Linux system.

:!: But at that point, why would you be using FileBot Node in the first place? You could just use cron to schedule docker filebot amc script calls directly, without having FileBot Node running at all.
:idea: Please read the FAQ and How to Request Help.
OutrageousGem
Posts: 11
Joined: 12 Apr 2019, 06:20

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by OutrageousGem »

1, Got it.

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

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Post by rednoah »

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.
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.

:idea: Use the @file syntax for reading command-line arguments from external text files. That'll make things easy as pie. That's also what prepared tasks do in form of *.args files. ;)
:idea: Please read the FAQ and How to Request Help.
mami7880
Posts: 2
Joined: 19 Mar 2019, 11:29

Re: Exclude Blacklist & Series-Mappings

Post by mami7880 »

Hi and sorry,

I missed youre Post and now i have no file paths or logs because of new installation of my system.
Next time, I will send the information as well.
nothinghere
Posts: 8
Joined: 13 Jul 2014, 18:10

Re: [EVAL] Split code into external *.groovy script files

Post by nothinghere »

I've tried using a few different things, but even having something as simple as:
test.groovy=>
{n}
and then doing movieFormat="{include 'test.groovy'}"
also tested movieFormat="{evaluate('test.groovy' as File)}"

results in an empty name..am I missing something? I may not have understood what should be in the groovy file, but from what I can see it should just be the same expression as we can already use in a one liner format?

*edit 2* updated to 4.8.6, but still getting empty file name
Post Reply