AMC Not Running after RuTorrent Finishes Download

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
j66454
Posts: 7
Joined: 08 Jun 2019, 14:29

AMC Not Running after RuTorrent Finishes Download

Post by j66454 »

Hi All,

I'm running ruTorrent version 0.9.7 with AMC. I've got all of the files set up etc (as per below) and FileBot is not starting when files have been downloaded via ruTorrent.

Here is my rtorrent-postprocess.sh file;

Code: Select all

#!/bin/sh -xu

# Input Parameters
ARG_PATH="$1"
ARG_NAME="$2"
ARG_LABEL="$3"

# Configuration
CONFIG_OUTPUT="/home/<username>/Cloud"

filebot -script fn:amc --output "$CONFIG_OUTPUT" --action copy --conflict skip -non-strict --def "ut_label=music" --def "ut_label=tv" --def "ut_label=movie" -no-xattr --log-file amc.log printenv > "/home/<username>/.filebot" --def unsorted=y music=y artwork=y excludeList="/home/<username>/.filebot/.excludes" ut_dir="$ARG_PATH" ut_kind=multi ut_title="$ARG_NAME" ut_label="$ARG_LABEL" --def @/home/<username>/.filebot/formatting &


# filebot -script fn:amc --output "$CONFIG_OUTPUT" --action copy --conflict skip -non-strict -no-xattr --log-file amc.log --def unsorted=y music=y artwork=y excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" &

The formatting file is this;

Code: Select all

movieFormat=Movies/{n}/{plex}
seriesFormat=Shows/{n}/{plex.name}
animeFormat=Anime/{n}/{plex}
musicFormat=Music/{n}/{album+'/'}{pi.pad(2)+'. '}{artist} - {t}
And here is my .rtorrent.rc file

Code: Select all

# -- START HERE --
directory.default.set = /home/<username>/torrents/rtorrent
encoding.add = UTF-8
encryption = allow_incoming,try_outgoing,enable_retry
execute.nothrow = chmod,777,/home/<username>/.config/rpc.socket
execute.nothrow = chmod,777,/home/<username>/.sessions
network.port_random.set = yes
network.port_range.set = 10471-11971
network.scgi.open_local = /var/run/<username>/.rtorrent.sock
schedule2 = chmod_scgi_socket, 0, 0, "execute2=chmod,\"g+w,o=\",/var/run/<username>/.rtorrent.sock"
network.tos.set = throughput
pieces.hash.on_completion.set = no
protocol.pex.set = no
method.set_key=event.download.finished,filebot,"execute={/home/<username>/.filebot/rtorrent-postprocess.sh,$d.base_path=,$d.name=,$d.custom1=}" 
method.insert = d.get_data_full_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
schedule = watch_directory,5,5,load.start=/home/<username>/rwatch/*.torrent
session.path.set = /home/<username>/.sessions/
throttle.global_down.max_rate.set = 0
throttle.global_up.max_rate.set = 0
throttle.max_peers.normal.set = 100
throttle.max_peers.seed.set = -1
throttle.max_uploads.global.set = 100
throttle.min_peers.normal.set = 1
throttle.min_peers.seed.set = -1
trackers.use_udp.set = yes

execute = {sh,-c,/usr/bin/php /srv/rutorrent/php/initplugins.php <username> &}

# -- END HERE --
I'm running Linux 16.04 with QuickBox installed. My licence has been activated as well. Both my /.filebot directory and my media directory are owned by my user and permissions are set to 755 all round. Any ideas would be great to get this resolved.

In RuTorrent, once a torrent has finished it does give a status of finished.

Because FileBot isn't starting up, I can't provide logs either.

Thanks
j66454
Posts: 7
Joined: 08 Jun 2019, 14:29

Re: AMC Not Running after RuTorrent Finishes Download

Post by j66454 »

Further to this, I have done some troubleshooting and outputted this log file for FileBot;

Code: Select all

# Environment Variables #
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install:/usr/local/bin/quickbox/bin/apps/rutorrent/plugins::/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install::/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install::/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install::/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install::/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install::/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install::/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install::/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install::/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install::/bin/su:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/quickbox/system:/usr/local/bin/quickbox/apps:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/remove:/usr/local/bin/quickbox/apps/extras/rutorrent/plugins/install::/home/<username>/.filebot/filebot-portable/lib/Linux-x86_64
LC_MEASUREMENT: en_US.UTF-8
HISTCONTROL: ignoredups
LC_TELEPHONE: en_US.UTF-8
LC_TIME: en_US.UTF-8
LESS_TERMCAP_se: [0m
LC_MESSAGES: en_US.UTF-8
LESS_TERMCAP_so: [01;44;33m
PS1: \[\e[m\n\e[1;30m\][$$:$PPID \j:\!\[\e[1;30m\]]\[\e[0;36m\] \T \d \[\e[1;30m\][\[\e[1;34m\]\u@\H\[\e[1;30m\]\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n($SHLVL:\!)\$ 
MAIL: /var/mail/root
LC_COLLATE: en_US.UTF-8
LS_OPTIONS: --color=auto
LC_PAPER: en_US.UTF-8
LOGNAME: root
PROMPT_COMMAND: history -a;(($SECONDS % 10==0 ))&&eval "$AA_P";echo -en "$PVE";
PWD: /home/<username>/.filebot
HISTTIMEFORMAT: [1;36m[%d/%m %H:%M:%S][m 
LANGUAGE: en_US.UTF-8
SHELL: /bin/bash
HISTIGNORE: &:bg:fg:ll:h
LESSOPEN: |/usr/bin/lesspipe.sh %s 2>&-
LC_ADDRESS: en_US.UTF-8
PAGER: less
OLDPWD: /root
LC_ALL: en_US.UTF-8
LESS: -i -N -w  -z-4 -g -e -M -X -F -R -P%t?f%f \
:stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...
LC_CTYPE: 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:mi=00: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:*.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:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
SHLVL: 1
LC_IDENTIFICATION: en_US.UTF-8
LESS_TERMCAP_md: [01;31m
LESS_TERMCAP_me: [0m
LESS_TERMCAP_mb: [01;31m
LESSCLOSE: /usr/bin/lesspipe %s %s
LC_MONETARY: en_US.UTF-8
LESSCHARSET: latin1
TERM: xterm
LESS_TERMCAP_us: [01;32m
LANG: en_US.UTF-8
DISPLAY: 86.173.217.187:0.0
LESS_TERMCAP_ue: [0m
TIMEFORMAT: 
real %3R	user %3U	sys %3S	pcpu %P

LC_NAME: en_US.UTF-8
_: /usr/local/bin/filebot
NVM_DIR: /root/.nvm
HOSTFILE: /root/.hosts
USER: root
AA_P: export PVE="\033[m\033[38;5;2m"$(( `sed -n "s/MemFree:[\t ]\+\([0-9]\+\) kB/\1/p" /proc/meminfo` / 1024 ))"\033[38;5;22m/"$((`sed -n "s/MemTotal:[\t ]\+\([0-9]\+\) kB/\1/p" /proc/meminfo`/ 1024 ))MB"\t\033[m\033[38;5;55m$(< /proc/loadavg)\033[m";echo -en ""
LC_NUMERIC: en_US.UTF-8
EDITOR: nano
PVE: \033[m\033[38;5;2m54800\033[38;5;22m/64310MB\t\033[m\033[38;5;55m6.57 2.17 0.77 5/549 2423\033[m
HOME: /root


# Java System Properties #
java.vendor: Oracle Corporation
sun.java.launcher: SUN_STANDARD
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
os.name: Linux
sun.boot.class.path: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/classes
net.filebot.util.prefs.file: /home/<username>/.filebot/filebot-portable/data/root/prefs.properties
grape.root: /home/<username>/.filebot/filebot-portable/data/root/grape
java.vm.specification.vendor: Oracle Corporation
java.runtime.version: 1.8.0_212-8u212-b03-0ubuntu1.16.04.1-b03
useExtendedFileAttributes: true
user.name: root
user.language: en
sun.boot.library.path: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64
jna.nosys: true
application.deployment: tar
net.filebot.license: /home/<username>/.filebot/filebot-portable/data/.license
java.version: 1.8.0_212
user.timezone: 
sun.arch.data.model: 64
java.endorsed.dirs: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/endorsed
sun.cpu.isalist: 
sun.net.client.defaultConnectTimeout: 10000
sun.jnu.encoding: UTF-8
file.encoding.pkg: sun.io
unixfs: false
file.separator: /
java.specification.name: Java Platform API Specification
java.class.version: 52.0
user.country: US
jna.boot.library.path: /home/<username>/.filebot/filebot-portable/lib/Linux-x86_64:
java.home: /usr/lib/jvm/java-8-openjdk-amd64/jre
useCreationDate: false
java.vm.info: mixed mode
os.version: 4.15.0-51-generic
path.separator: :
java.vm.version: 25.212-b03
java.util.prefs.PreferencesFactory: net.filebot.util.prefs.FilePreferencesFactory
java.awt.printerjob: sun.print.PSPrinterJob
sun.io.unicode.encoding: UnicodeLittle
awt.toolkit: sun.awt.X11.XToolkit
application.dir: /home/<username>/.filebot/filebot-portable/data/root
jna.library.path: /home/<username>/.filebot/filebot-portable/lib/Linux-x86_64:
net.filebot.media.parser: libmediainfo
http.agent: FileBot/4.8.5
user.home: /home/<username>/.filebot/filebot-portable/data/root
java.specification.vendor: Oracle Corporation
java.library.path: /home/<username>/.filebot/filebot-portable/lib/Linux-x86_64:
java.vendor.url: http://java.oracle.com/
java.vm.vendor: Oracle Corporation
java.runtime.name: OpenJDK Runtime Environment
sun.java.command: /home/<username>/.filebot/filebot-portable/jar/filebot.jar -script fn:sysenv
java.class.path: /home/<username>/.filebot/filebot-portable/jar/filebot.jar
net.filebot.archive.extractor: SevenZipNativeBindings
java.vm.specification.name: Java Virtual Machine Specification
java.vm.specification.version: 1.8
sun.cpu.endian: little
sun.os.patch.level: unknown
java.io.tmpdir: /home/<username>/.filebot/filebot-portable/data/root/tmp
java.vendor.url.bug: http://bugreport.sun.com/bugreport/
swing.crossplatformlaf: javax.swing.plaf.nimbus.NimbusLookAndFeel
os.arch: amd64
java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment
java.ext.dirs: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/java/packages/lib/ext
user.dir: /home/<username>/.filebot
line.separator: 

java.vm.name: OpenJDK 64-Bit Server VM
java.net.useSystemProxies: true
org.apache.commons.logging.Log: org.apache.commons.logging.impl.NoOpLog
file.encoding: UTF-8
sun.net.client.defaultReadTimeout: 60000
jna.nounpack: true
java.specification.version: 1.8
application.cache: /home/<username>/.filebot/filebot-portable/data/root/cache


# Arguments #
args[0] = -script
args[1] = fn:sysenv


Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Not Running after RuTorrent Finishes Download

Post by rednoah »

1.
What have you tried so far?
viewtopic.php?f=4&t=3067

Is your script rtorrent-postprocess.sh ever called? If no, that's the first problem you're gonna have to tackle, unrelated to filebot.



2.
You can't just > redirect in the middle of your argument sequence:

Code: Select all

command > file
Redirecting both standard output and error output is extremely important, because the letter will tell you about syntax errors in your command:

Code: Select all

command > file 2>&1
Note that randomly pasting a command into the filebot argument sequence will definitely lead to random unspecified errors:

Code: Select all

printenv > "/home/<username>/.filebot"
:!: This is a bad idea, because if your torrent client isn't running as your user, then it won't have permissions to access your $HOME directory, plus $HOME/.filebot is likely already an existing folder, so it probably can't write a file to this path, so it's gonna double not work and you definitely won't get logs.

:!: It looks like you haven't tested your script manually at all. Step 1 is always to run the script yourself. Once you're happy with how it works, and know that it indeed works, then and only then do you start with Step 2, integrating with 3rd party tools and make them call your working script.

A debug script might look like this:
https://github.com/filebot/plugins/blob ... h/debug.sh
:idea: Please read the FAQ and How to Request Help.
Post Reply