#1
|
|||
|
|||
![]()
Hello,
few weeks ago i switched to a new system (from windows to debian) and for some reason my event script is not working and i think it's not even being executed. I've played around quite a bit, the only thing i noticed is if i use a different trigger (on package finished) my bash script is being executed. If i use ON_ARCHIVE_EXTRACED i don't get any output / error. The scripts below are now for test purposes that should execute filebot.. I've tried others as well for debugging but as stated above, no output. jdlog://2230411370661 -- REMOTE SYSTEM ------------------------------------------- OS: Linux (LINUX 64Bit) (amd64 64Bit) JAVA: 17.0.9+9-Debian-1deb12u1 (64Bit) (headless) Debian OpenJDK 64-Bit Server VM JAVA HEAP: 40.86 MB / 142.61 MB / 8.35 GB STARTUP TIME: 00h 01m 58s (startup time: 18.01.24 21:01) [STORAGE INFORMATION] /: 76776996864 / 118111600640 /mnt/disk1: 7236143271936 / 17927505408000 /mnt/disk2: 1241304416256 / 10000829247488 /mnt/disk3: 186727550976 / 6001039241216 shell script #!/bin/sh -xu # Input Parameters ARG_PATH="$1" ARG_NAME="$2" ARG_LABEL="$3" # Configuration CONFIG_OUTPUT="/mnt/disk2/_download/extracted/" filebot -script fn:amc --output "$CONFIG_OUTPUT" --action duplicate --conflict skip -non-strict --log-file /root/amc.log --def skipExtract=y unsorted=y music=y artwork=y excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" org.jdownloader.extensions.eventscripter.EventScripterExtension.scripts.json Code:
[{"eventTrigger":"ON_ARCHIVE_EXTRACTED","eventTriggerSettings":{"isSynchronous":false},"id":1705607093820,"name":"Execute FileBot (PackageFinished)","script":"var script = JD_HOME + '/jdownloader-postprocess.sh'\n\nvar package = archive.getDownloadLinks() ? archive.getDownloadLinks()[0].getPackage() : null\nvar links = package ? package.getDownloadLinks() : []\n\nfunction isReallyFinished() {\n\tfor (var i = 0; i < links.length; i++) {\n\t\tif (links[i].getArchive() != null && links[i].getExtractionStatus() != \"SUCCESSFUL\" || !package.isFinished()) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nif (package && isReallyFinished()) {\n\tvar command = [script, package.getDownloadFolder(), package.getName(), package.getComment() ? package.getComment() : 'N/A', 'ARCHIVE_EXTRACTED']\n\tlog(command)\n\tlog(callSync(command))\n}","enabled":true}] EDIT: Running the script directly works just fine. |
#2
|
|||
|
|||
![]()
After unticking "Extraction: Delete Archive Downloadlinks After Extraction
Delete archive DownloadLinks after successful extraction?" the script is being executed. Why would the script not run with this ticked? Was running fine under Windows. |
![]() |
Thread Tools | |
Display Modes | |
|
|