diff --git a/installer/qpkg/shared/bin/filebot.sh b/installer/qpkg/shared/bin/filebot.sh index 94614d34..ba17e184 100755 --- a/installer/qpkg/shared/bin/filebot.sh +++ b/installer/qpkg/shared/bin/filebot.sh @@ -13,14 +13,16 @@ fi export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" -# choose extractor -EXTRACTOR="ApacheVFS" # use Apache Commons VFS2 with junrar plugin -# EXTRACTOR="SevenZipExecutable" # use the 7z executable -# EXTRACTOR="SevenZipNativeBindings" # use the lib7-Zip-JBinding.so native library - -# choose media parser -MEDIA_PARSER="libmediainfo" # use libmediainfo -# MEDIA_PARSER="ffprobe" # use ffprobe +# choose archive extractor / media characteristics parser +if uname -m | grep "86"; then + # i686 or x86_64 + ARCHIVE_EXTRACTOR="SevenZipNativeBindings" # use lib7-Zip-JBinding.so + MEDIA_PARSER="libmediainfo" # use libmediainfo +else + # armv7l or aarch64 + ARCHIVE_EXTRACTOR="ApacheVFS" # use Apache Commons VFS2 + MEDIA_PARSER="ffprobe" # use ffprobe +fi # choose ffprobe executable FFPROBE="/mnt/ext/opt/medialibrary/bin/ffprobe" @@ -30,4 +32,4 @@ APP_DATA="$QPKG_ROOT/data/$USER" LIBRARY_PATH="$QPKG_ROOT/lib/$(uname -m)" # start filebot -java -Dapplication.deployment=qpkg -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.media.ffprobe="$FFPROBE" -Dnet.filebot.Archive.extractor="$EXTRACTOR" -Djava.awt.headless=true @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$QPKG_ROOT/jar/filebot.jar" "$@" +java -Dapplication.deployment=qpkg -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.media.ffprobe="$FFPROBE" -Dnet.filebot.Archive.extractor="$ARCHIVE_EXTRACTOR" -Djava.awt.headless=true @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$QPKG_ROOT/jar/filebot.jar" "$@" diff --git a/installer/spk/package/filebot.sh b/installer/spk/package/filebot.sh index 0852ef24..84baafa0 100755 --- a/installer/spk/package/filebot.sh +++ b/installer/spk/package/filebot.sh @@ -45,14 +45,16 @@ fi export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" -# choose extractor -EXTRACTOR="ApacheVFS" # use Apache Commons VFS2 with junrar plugin -# EXTRACTOR="SevenZipExecutable" # use the 7z executable -# EXTRACTOR="SevenZipNativeBindings" # use the lib7-Zip-JBinding.so native library - -# choose media parser -MEDIA_PARSER="libmediainfo" # use libmediainfo -# MEDIA_PARSER="ffprobe" # use ffprobe +# choose archive extractor / media characteristics parser +if uname -m | grep "86"; then + # i686 or x86_64 + ARCHIVE_EXTRACTOR="SevenZipNativeBindings" # use lib7-Zip-JBinding.so + MEDIA_PARSER="libmediainfo" # use libmediainfo +else + # armv7l or aarch64 + ARCHIVE_EXTRACTOR="ApacheVFS" # use Apache Commons VFS2 + MEDIA_PARSER="ffprobe" # use ffprobe +fi # choose ffprobe executable FFPROBE="/volume1/@appstore/MediaServer/bin/ffprobe" @@ -62,4 +64,4 @@ APP_DATA="$FILEBOT_HOME/data/$USER" LIBRARY_PATH="$SYNO_LIBRARY_PATH:$PACKAGE_LIBRARY_PATH" # start filebot -java -Dapplication.deployment=spk -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.media.ffprobe="$FFPROBE" -Dnet.filebot.Archive.extractor="$EXTRACTOR" -Djava.awt.headless=true @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@" +java -Dapplication.deployment=spk -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.media.ffprobe="$FFPROBE" -Dnet.filebot.Archive.extractor="$ARCHIVE_EXTRACTOR" -Djava.awt.headless=true @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@" diff --git a/installer/tar/filebot.sh b/installer/tar/filebot.sh index 088abe52..476a6a4b 100755 --- a/installer/tar/filebot.sh +++ b/installer/tar/filebot.sh @@ -28,18 +28,20 @@ fi export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" -# choose extractor -EXTRACTOR="ApacheVFS" # use Apache Commons VFS2 with junrar plugin -# EXTRACTOR="SevenZipExecutable" # use the 7z executable -# EXTRACTOR="SevenZipNativeBindings" # use the lib7-Zip-JBinding.so native library - -# choose media parser -MEDIA_PARSER="libmediainfo" # use libmediainfo -# MEDIA_PARSER="ffprobe" # use ffprobe +# choose archive extractor / media characteristics parser +if uname -m | grep "86"; then + # i686 or x86_64 + ARCHIVE_EXTRACTOR="SevenZipNativeBindings" # use lib7-Zip-JBinding.so + MEDIA_PARSER="libmediainfo" # use libmediainfo +else + # armv7l or aarch64 + ARCHIVE_EXTRACTOR="ApacheVFS" # use Apache Commons VFS2 + MEDIA_PARSER="ffprobe" # use ffprobe +fi # select application data folder APP_DATA="$FILEBOT_HOME/data" LIBRARY_PATH="$PACKAGE_LIBRARY_PATH:$LD_LIBRARY_PATH" # start filebot -java -Dapplication.deployment=tar -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.Archive.extractor="$EXTRACTOR" @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@" +java -Dapplication.deployment=tar -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.Archive.extractor="$ARCHIVE_EXTRACTOR" @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@"