I’m using Entware-ng on an USB-stick with my zyxel NSA325v2 NAS.
Information about Entware-ng can be found here:
http://www.zyxelforum.de/viewtopic.php?f=311&t=10148
My goal is to use filebot.
I did install java 1.8.0_73 using the file ejdk-8u73-linux-arm-sflt.tar.gz.
ARMv5/ARMv6/ARMv7 Linux - SoftFP ABI, Little Endian 2
http://www.oracle.com/technetwork/java/ ... index.html
I did install the latest jdownloader-2.
I did install the latest filebot-version: filebot_4.6.1_noarch.ipk
Java, Jdownloader and filebot are installed under /opt on my entware-ng usb-stick.
Java & Jdownloader-2 are working well.
Within jdownloader I have installed the plugin “EventScripter”. I did put the following event-script into EventScripter:
Code: Select all
[{"eventTrigger":"ON_ARCHIVE_EXTRACTED",
"enabled":true,
"name":"FileBot",
"script":"var amcFile = \"/opt/share/filebot/jdtofilebot.sh\"; \n var path = archive.getFolder(); callAsync(function() {}, amcFile, path);",
"eventTriggerSettings":{}}]
Code: Select all
#!/bin/sh
##FileBot needs these variables
LOG="/i-data/path-to-my-logfiles/Log-Files/amc.log"
EXC="/i-data/ path-to-my-logfiles /Log-Files/amc.txt"
SERIEN="/i-data/path-to-my-series/Series/{n}/Staffel {s}/{n} S{s}E{e}"
FILME="/i-data/path-to-my-videos/Movies/{n} ({y})/{n} ({fn.contains('1080') ? '1080p ':''}{fn.contains('720') ? '720p ':''}{fn.contains('3D') || fn.contains('3-D') ? '3D ':''}HD)"
# ANIME="/i-data/md0/Anime/{n}/{n} E{absolute}"
##Run FileBot
# /ffp/filebot/filebot.sh -script fn:amc --lang de --log-file $LOG --action move "$1" --def "seriesFormat=$SERIEN" "movieFormat=$FILME" "animeFormat=$ANIME" -non-strict --def clean=y --def excludeList=$EXC --def xbmc=10.0.1.5
/bin/sh /opt/share/filebot/bin/filebot.sh -script fn:amc --lang de --log-file $LOG --action move "$1" --def "seriesFormat=$SERIEN" "movieFormat=$FILME" -non-strict --def clean=y --def excludeList=$EXC --def xbmc=10.0.1.5
## Clean empty folders, samples etc after processing
/bin/sh /opt/share/filebot/bin/filebot.sh -script fn:cleaner "$1" --def root=y
jdtofilebot.sh and filebot.sh have admin-permissions and are set as executable. Jdownloader runs as admin.
The content of filebot.sh is:
Code: Select all
#!/bin/sh
# make sure required environment variables are set
if [ -z "$USER" ]
then
export USER=`whoami`
fi
APP_ROOT="/opt/share/filebot"
APP_DATA="$APP_ROOT/data/$USER"
# add APP_ROOT to LD_LIBRARY_PATH
if [ ! -z "$LD_LIBRARY_PATH" ]
then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$APP_ROOT"
else
export LD_LIBRARY_PATH="$APP_ROOT"
fi
# force JVM language and encoding settings
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
# FileBot settings
# EXTRACTOR="SevenZipNativeBindings" # use the lib7-Zip-JBinding.so native library
# EXTRACTOR="SevenZipExecutable" # use the 7z executable
EXTRACTOR="ApacheVFS" # use Apache Commons VFS2 with junrar plugin
/opt/java/ejre1.7.0_55/bin/java $JAVA_OPTS -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Dfile.encoding="UTF-8" -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=ipkg -Dnet.filebot.Archive.extractor="$EXTRACTOR" -Dnet.filebot.AcoustID.fpcalc="fpcalc" -Dapplication.dir="$APP_DATA" -Djava.io.tmpdir="$APP_DATA/temp" -Duser.home="$APP_DATA" -jar "$APP_ROOT/FileBot.jar" "$@"
However nothing happened to my extracted file/folder in my download-folder (e.g.: the downloaded file was not moved to the according series/season-folder). Amc.log and amc.txt are still empty.
I opened a shell session and tried the following commands:
~ # /opt/java/ejdk1.8.0_73/linux_arm_sflt/jre/bin/java -version
java version "1.8.0_73"
Java(TM) SE Embedded Runtime Environment (build 1.8.0_73-b02, headless)
Java HotSpot(TM) Embedded Client VM (build 25.73-b02, mixed mode)
~ # /opt/java/ejdk1.8.0_73/linux_arm_sflt/jre/bin/java /opt/share/filebot/FileBot.jar
Error: Could not find or load main class .opt.share.filebot.FileBot.jar
So Java itself is fine (I guess, since jdownloader works well with java), however something is wrong with FileBot.
What did I do wrong?
What can I do to fix this?
Thank you for your help.