Page 1 of 1

Problem with filebot and AMC on Synology Diskstation

Posted: 10 Sep 2014, 20:54
by Vippis
Hi,

I use filebot on a Synology Diskstation DS213+. I installed Filebot 4.2 using Rednoah's SPK Packages. In advance I use pyload to download stuff.

I use a filebot hook for pyload from guys from the pyload forum: http://forum.pyload.org/viewtopic.php?f ... b&start=90

Although I think the commands are properly set filebot is not working after downloads are finished. If I enter the same command pyload calls filebot with via SSH it's working like a charm.

I really don't know how to fix the error. It seems that filebot is not even runned by pyload because there is no amc.log file created.

This is how pyload calls filebot:

Code: Select all

filebot -script fn:amc -non-strict --log-file amc.log -r --conflict override --action move --output /volume1/ --lang de --def clean=y skipExtract=y reportError=n artwork=n subtitles=de movieFormat='Filme/{n}({y})' seriesFormat='Serien_MCE/{n}/Staffel {s}/{n} - {s00e00} - {t}' musicFormat='music/{n}' /volume1/pyload/downloads/download.serienjunkies.org_f-5b3c2ebce48bcdd9_ul_outlanderAL101.html 
Can you help me?

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 11 Sep 2014, 05:55
by rednoah
So what's the output? First thing is to make sure you redirect stdout and stderr so you can see the output.

Besides, you're passing in a single html file? The script will ignore that and do nothing.

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 21 Sep 2014, 21:44
by poloNes
Hello ,

I installed on my Synology DS213 FileBot .
Accessing through putty command works perfectly.

I'm very noob , I'm not getting put in the scheduler Synology tasks .

Could you help me ?

Image

Sorry by my English because is not my first language , I speak Portuguese.

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 22 Sep 2014, 04:22
by rednoah
Running a command this way is different from shell. PATH / PROFILE / etc won't be initialized so it might not be able to find "filebot" or "java".

The first thing you wanna do is to redirect standard & error output to file so you can see what's not working.

PS: i can't read anything on that screenshot... can you?

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 22 Sep 2014, 09:23
by poloNes
Sorry for the image in Portuguese .

New images in English.

What is the command ?

thanks for help.

Image


Image

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 22 Sep 2014, 11:33
by rednoah
I don't teach basic cmdline / unix skills, there's plenty of resources online and here's a few links you might find useful:
http://www.filebot.net/forums/viewtopic.php?f=8&t=1558

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 22 Sep 2014, 17:59
by poloNes
rednoah wrote:I don't teach basic cmdline / unix skills, there's plenty of resources online and here's a few links you might find useful:
http://www.filebot.net/forums/viewtopic.php?f=8&t=1558
Could create the script but does not work on the Synology scheduler tasks .

filebotsuball.sh

Code: Select all

#!/bin/sh
/volume1/@appstore/filebot/filebot.sh -script fn:suball --lang pob --def maxAgeDays=21 /volume1/video/Series
I think it must be some problem in task scheduler .

The script works perfectly for putty .

By task scheduler does not work .

Code: Select all

/volume1/public/filebotsuball.sh
I will keep searching until you find the problem .

Thank you .

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 22 Sep 2014, 18:11
by rednoah
The first thing you REALLY wanna do is to redirect standard & error output to file so you can see what's not working.

Image

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 22 Sep 2014, 20:14
by poloNes
rednoah wrote:The first thing you REALLY wanna do is to redirect standard & error output to file so you can see what's not working.

Image
Says not possible to find the java

Code: Select all

/volume1/@appstore/filebot/filebot.sh: line 35: java: not found

Code: Select all

#!/bin/sh
PRG="$0"

# resolve relative symlinks
while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '/.*' > /dev/null; then
    PRG="$link"
  else
    PRG="`dirname "$PRG"`/$link"
  fi
done

# make it fully qualified
WORKING_DIR=`pwd`
PRG_DIR=`dirname "$PRG"`
APP_ROOT=`cd "$PRG_DIR" && pwd`

# restore original working dir
cd "$WORKING_DIR"


# add APP_ROOT to LD_LIBRARY_PATH
if [ ! -z "$LD_LIBRARY_PATH" ]
then
  export LD_LIBRARY_PATH="$APP_ROOT:$LD_LIBRARY_PATH"
else
  export LD_LIBRARY_PATH="$APP_ROOT"
fi

# force JVM language and encoding settings
export LANG=en_US.utf8

java -Djava.awt.headless=true -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Dfile.encoding=UTF-8 -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=spk -Dapplication.analytics=true -Dnet.filebot.AcoustID.fpcalc=fpcalc "-Dapplication.dir=$APP_ROOT" "-Djava.io.tmpdir=$APP_ROOT/temp" "-Duser.home=$APP_ROOT" -Djava.util.prefs.PreferencesFactory=net.filebot.util.prefs.FilePreferencesFactory "-Dnet.filebot.util.prefs.file=$APP_ROOT/prefs.properties" -jar "$APP_ROOT/FileBot.jar" "$@"

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 22 Sep 2014, 20:25
by rednoah
Running a command this way is different from shell. PATH / PROFILE / etc won't be initialized so it might not be able to find "filebot" or "java".
I know. I guess you'll need to export PATH in your script, like the login shell would have done via ~/.profile

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 22 Sep 2014, 20:25
by rednoah
Running a command this way is different from shell. PATH / PROFILE / etc won't be initialized so it might not be able to find "filebot" or "java".
I know. I guess you'll need to export PATH in your script, like the login shell would have done via ~/.profile

Re: Problem with filebot and AMC on Synology Diskstation

Posted: 22 Sep 2014, 20:52
by poloNes
rednoah wrote:
Running a command this way is different from shell. PATH / PROFILE / etc won't be initialized so it might not be able to find "filebot" or "java".
I know. I guess you'll need to export PATH in your script, like the login shell would have done via ~/.profile
I find out the Root's .profile, so I copy below. E saw that there is the path for java as you can see, but It doesn't work yet.


Thank you for helping me.

Code: Select all

umask 022

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
export PATH

#This fixes the backspace when telnetting in.
#if [ "$TERM" != "linux" ]; then
#        stty erase
#fi

HOME=/root
export HOME

TERM=${TERM:-cons25}
export TERM

PAGER=more
export PAGER

PS1="`hostname`> "

alias dir="ls -al"
alias ll="ls -la"
PATH=$PATH:/volume1/@appstore/java8/ejdk1.8.0_06/linux_arm_sflt/jre/bin # Synology Java Package
TZ='America/Sao_Paulo' # Synology Java Package
export PATH TZ # Synology Java Package


Re: Problem with filebot and AMC on Synology Diskstation

Posted: 22 Sep 2014, 22:51
by poloNes
I have edited the last line of the file filebot.sh, replacing java by the full path:

/volume1/@appstore/java8/ejdk1.8.0_06/linux_arm_sflt/jre/bin/java

Now its is working , I can use that way or will I have a problem?

Code: Select all

/volume1/@appstore/java8/ejdk1.8.0_06/linux_arm_sflt/jre/bin/java -Djava.awt.headless=true -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Dfile.encoding=UTF-8 -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=spk -Dapplication.analytics=true -Dnet.filebot.AcoustID.fpcalc=fpcalc "-Dapplication.dir=$APP_ROOT" "-Djava.io.tmpdir=$APP_ROOT/temp" "-Duser.home=$APP_ROOT" -Djava.util.prefs.PreferencesFactory=net.filebot.util.prefs.FilePreferencesFactory "-Dnet.filebot.util.prefs.file=$APP_ROOT/prefs.properties" -jar "$APP_ROOT/FileBot.jar" "$@"