#!/bin/bash
if [ $1 ] && [ $1 == '-h' ]
then
echo ""
echo "Welcome to Filebot AMC (Automated Media Center) Script."
echo ""
echo "Usage: filebot-amc.sh [torrent_name] [/path/to/torrent] [/path/to/media] [/path/to/log]"
echo ""
echo "NOTES: "
echo "1. Arguments [torrent_name] and [/path/to/torrent] if this is script is by Transmission Bittorrent Client post-download hook."
echo "2. Arguments [/path/to/media] and [/path/to/log] are optional if you set defaults values changing this script"
echo ""
exit
fi
# Torrent Name
if [ $1 ]
then
TR_NAME=$1
else
TR_NAME=$TR_TORRENT_NAME
fi
# Torrent Dir
if [ $2 ]
then
TR_DIR=$2
else
TR_DIR=$TR_TORRENT_DIR
fi
# Target Media Dir
if [ $3 ]
then
TARGET_DIR="/Volumes/YYYYYYY/XXXXXX/Video"
else
TARGET_DIR="/Volumes/YYYYYYY/XXXXXX/Video"
fi
# Log Path
if [ $4 ]
then
LOG_PATH=$4
else
LOG_PATH="filebot_amc.log"
fi
echo "TR_DIR=$TR_DIR"
echo "TR_NAME=$TR_NAME"
echo "TARGET_DIR=$TARGET_DIR"
echo "LOG_PATH=$LOG_PATH"
### If all params are set, go on ###
if [ $TR_DIR ] && [ $TR_NAME ] && [ $TARGET_DIR ] && [ $LOG_PATH ]
then
/Applications/FileBot.app/Contents/MacOS/filebot.sh \
-script fn:amc \
--output "$TARGET_DIR" \
--log-file "$LOG_PATH" \
--action move \
--conflict override -non-strict \
--def pushbullet=XXXXXXXXXXXXXXXXXXXXXXXXXXXX deleteAfterExtract=y subtitles=en music=n artwork=y backdrops=n clean=y "ut_dir=$TR_DIR/$TR_NAME" "ut_kind=multi" "ut_title=$TR_NAME"
else
echo "PROBLEM: Please, set all arguments needed. Use -h option to get help about it."
echo ""
fi
You'll want to look at the full console output first (and post it!) and see if anything is odd. Staring at the code won't help me or you find any issues.
Locking /Users/xxxxxxx/filebot_amc.log
Run script [fn:amc] at [Mon Jun 13 20:19:19 ICT 2016]
Parameter: pushbullet = *****
Parameter: deleteAfterExtract = y
Parameter: subtitles = en
Parameter: music = n
Parameter: artwork = y
Parameter: backdrops = n
Parameter: clean = y
Parameter: ut_dir = /Users/xxxxx/xxxxxx/xxxxx.xxxxxxxx.xxxxxxx
Parameter: ut_kind = multi
Parameter: ut_title = xxxxx.xxxxxxxx.xxxxxxx
FATAL ERROR: Field 'sevenZipArchiveInStreamInstance' in the class 'net.sf.sevenzipjbinding.impl.InArchiveImpl' was not found
Crash jvm to get a stack trace
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000129ad79e0, pid=29638, tid=3079
#
# JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [lib7-Zip-JBinding.dylib+0x59e0] fatal(char const*, ...)+0x100
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /var/folders/2l/18xp4q4n5m952n2jz5lkmv900000gn/T//hs_err_pid29638.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Run script [fn:amc] at [Mon Jun 13 23:20:07 ICT 2016]
Parameter: pushbullet = *****
Parameter: deleteAfterExtract = y
Parameter: subtitles = en
Parameter: music = n
Parameter: artwork = y
Parameter: backdrops = n
Parameter: clean = y
Parameter: ut_dir =
Parameter: ut_kind = multi
Parameter: ut_title = FATAL ERROR: Field 'sevenZipArchiveInStreamInstance' in the class 'net.sf.sevenzipjbinding.impl.InArchiveImpl' was not found
Crash jvm to get a stack trace
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000001260f89e0, pid=2552, tid=0x0000000000000c07
#
# JRE version: Java(TM) SE Runtime Environment (8.0_92-b14) (build 1.8.0_92-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.92-b14 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [lib7-Zip-JBinding.dylib+0x59e0] _Z5fatalPKcz+0x100
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /var/folders/2l/18xp4q4n5m952n2jz5lkmv900000gn/T//hs_err_pid2552.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Jun 13, 2016 11:21:59 PM net.sf.ehcache.store.disk.DiskStorageFactory <init>
WARNING: The index for data file /Users/sutheep/.filebot/cache/0/github_stable_0.data is out of date, probably due to an unclean shutdown. Deleting index file /Users/sutheep/.filebot/cache/0/github_stable_0.index
FileBot 4.7 (r4044)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.69
7-Zip-JBinding: java.lang.UnsatisfiedLinkError: net.sf.sevenzipjbinding.SevenZip.nativeGetVersionMajor()I
Chromaprint: fpcalc version 1.1.0 (/Applications/Filebot.app/Contents/MacOS/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.7
JRE: Java(TM) SE Runtime Environment 1.8.0_92
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 2 GB Max Memory / 23 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
Data: /Users/sutheep/.filebot
uname: Darwin Siara.local 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
Done ヾ(@⌒ー⌒@)ノ