Filebot+AMC acting strange on my feral seedbox

Any questions? Need some help?
Post Reply
EnergyBalls
Posts: 4
Joined: 03 Mar 2016, 18:51

Filebot+AMC acting strange on my feral seedbox

Post by EnergyBalls »

So the past few days I've been trying desperately to get CLI filebot and AMC working on my feral seedbox.

I prefer Deluge, so after confirming that i had java and filebot 4.6 installed on my box, i used this tutorial for Deluge and AMC:
viewtopic.php?f=4&t=215#p3382

I even tried the updated version of script that rednoah did 12 hours ago from me writing this, but i still hav the same

I created a "Torrent Complete" action in deluge pointing it to the script. But no matter what i try, AMC wont run. It wont even create a log for me to share here.

I was able to get other basic scripts to executed by changing the permissions with chmod u+r, and chmod+rx, I've tried both and i still have the same issue, so i dont think it's a permissions issue.

Here's what's weird - i have a folder "media" on the root directory of my box. I went a head and created 2 folders inside, "TV Shows" and "Movies". When i complete a torrent (with the deluge postprocess script set to run. it CLEARS out that media folder. the "TV Shows" and "Movies" folders are completely gone. It doesnt delete any other content thats in the media folder, just the TV Shows and Movies folders. If i re-add the folders manually and complete another torrent, they're gone again. How could it delete these folders without the "clean" command?


Here are 2 script versions I've tried, first is default:

Code: Select all

#!/bin/sh

# Input Parameters
export OPT_PATH="$3"
export OPT_NAME="$2"
export OPT_LABEL="N/A"

# Configuration
export CONF_OUTPUT="$HOME/media" # if this script is called by the deluge user, then $HOME will NOT refer to YOUR user home, but paths such as /var/lib/deluge instead

# Sanity Check
if [ ! -w "$HOME" ]; then
	echo "$HOME must be writable" 1>&2 # filebot requires a valid $HOME folder
	exit 2
fi

filebot -script fn:amc --output "$CONF_OUTPUT" --action symlink --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y excludeList=".excludes" ut_dir="$OPT_PATH" ut_kind="multi" ut_title="$OPT_NAME" ut_label="$OPT_LABEL"
And then based on the "sanity check" bit that rednoah updated yesterday, i tried replacing it with the full path to my media folder:

Code: Select all

#!/bin/sh

# Input Parameters
export OPT_PATH="$3"
export OPT_NAME="$2"
export OPT_LABEL="N/A"

# Configuration
export CONF_OUTPUT="/media/sdq1/energyballs/media" # if this script is called by the deluge user, then $HOME will NOT refer to YOUR user home, but paths such as /var/lib/deluge instead

# Sanity Check
if [ ! -w "$HOME" ]; then
	echo "$HOME must be writable" 1>&2 # filebot requires a valid $HOME folder
	exit 2
fi

filebot -script fn:amc --output "$CONF_OUTPUT" --action symlink --conflict auto -non-strict --log-file amc.log --def unsorted=y music=y artwork=y excludeList=".excludes" ut_dir="$OPT_PATH" ut_kind="multi" ut_title="$OPT_NAME" ut_label="$OPT_LABEL"
I'm really hoping it just a simple mistake on my part. It's just odd that it doesn't even create a log. I've tried so many times and i know that i can execute scripts in Deluge so it has to be an issue with the script itself. I'm almost to the point where i will PAY someone to set this up for me lol. Any help/tips/advice would be HUGELY appreciated!!
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot+AMC acting strange on my feral seedbox

Post by rednoah »

It wont even create a log for me to share here.
Stopped reading at "no logs". Did you read Shell Script Debugging for Beginners? Which part did you not understand? Redirect output to a file and see what it says.
:idea: Please read the FAQ and How to Request Help.
EnergyBalls
Posts: 4
Joined: 03 Mar 2016, 18:51

Re: Filebot+AMC acting strange on my feral seedbox

Post by EnergyBalls »

Of course i did, so what do i do if it doesn't create any logs??
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot+AMC acting strange on my feral seedbox

Post by rednoah »

Make sure your script is actually called
How did you confirm that?
Make sure to collect all the output so you can see what's going on
What's the output? (there cannot be no output, it's either something, or error output)


The shell script you posted neither contains debug calls (1.) nor does it redirect output (2.) of the amc script. What exactly did you try after carefully reading Shell Script Debugging for Beginners and applying what you have learnt?


EDIT:


I expect minimum copy-paste effort. If your script doesn't contain any lines like this, then I can only assume that you didn't read or understand Shell Script Debugging for Beginners:

Code: Select all

printenv > "/path/to/log.txt"

Code: Select all

filebot -script fn:sysenv > "/path/to/log.txt" 2>&1
:idea: Please read the FAQ and How to Request Help.
EnergyBalls
Posts: 4
Joined: 03 Mar 2016, 18:51

Re: Filebot+AMC acting strange on my feral seedbox

Post by EnergyBalls »

My apologies, i thought it was referring to amc.log.

I'm fairly new at this and so please try and go easy, i know it can be frustrating.

So when i added part 1 to my script i did get the log as here's what it said:

Code: Select all

MAIL=/var/mail/energyballs
SSH_CLIENT=67.191.152.26 55217 22
USER=energyballs
OPT_LABEL=N/A
SHLVL=1
HOME=/media/sdq1/energyballs
SSH_TTY=/dev/pts/343
CONF_OUTPUT=/media/sdq1/energyballs/media
LOGNAME=energyballs
_=/usr/local/bin/deluged
TERM=xterm-256color
OPT_NAME=Suits.S05E16.HDTV.x264-KILLERS[ettv]
PATH=/media/sdq1/energyballs/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
LANG=en_US.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
SHELL=/bin/bash
OPT_PATH=/media/sdq1/energyballs/torrents
PWD=/media/sdq1/energyballs
SSH_CONNECTION=67.191.152.26 55217 185.21.217.61 22
And when I add part 2 to the script the log says this:

Code: Select all

/media/sdq1/energyballs/deluge-postprocess.sh: 21: /media/sdq1/energyballs/deluge-postprocess.sh: filebot: not found


Calling for the version of filebot i have with SSH it shows "FileBot 4.6 (r3052) / Java(TM) SE Runtime Environment 1.8.0_65 (headless)"

Sorry for my ignorance and thank you for your patience.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot+AMC acting strange on my feral seedbox

Post by rednoah »

PATH issues. Doesn't get any more basic than that. Replace "filebot" with the absolute path to the filebot executable (or fix the $PATH) and then try again.

PS: since filebot isn't even started, I highly doubt that it's touching any files one way or another :lol:
:idea: Please read the FAQ and How to Request Help.
EnergyBalls
Posts: 4
Joined: 03 Mar 2016, 18:51

Re: Filebot+AMC acting strange on my feral seedbox

Post by EnergyBalls »

I knew it would be something dumb like that :P Working beautifully. Thanks for the crazy fast responses!
Post Reply