amc script no work "no such file found"

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
sanpaille
Posts: 6
Joined: 05 Dec 2019, 12:44

amc script no work "no such file found"

Post by sanpaille »

hi guy's i have a error in my rtorrent-postprocess after modified and installed filebot official (before i use filebot all in one ) and i dont see where !
some help with it will be great !

here is my Log AMC :

Code: Select all

Run script [fn:amc] at [Thu Dec 05 11:36:28 UTC 2019]
Parameter: plex = *****
Parameter: artwork = y
Parameter: seriesFormat = {output}/TV/{n}/{'Season '+s}/{n} - {s00e00} - {t}
Parameter: ut_dir = /home/sanpaille/torrents//home/sanpaille/torrents/V.Wars.2019.S01.1080p.NF.WEB.DDP5.1.x264-AX
Parameter: ut_kind = multi
Parameter: ut_title = V.Wars.2019.S01.1080p.NF.WEB.DDP5.1.x264-AX
Parameter: ut_label = tv
LicenseError: UNREGISTERED
No files selected for processing
Done ¯\_(ツ)_/¯
here my rtorrent-postprocess :

Code: Select all

#!/bin/bash
TORRENT_PATH=$1
TORRENT_NAME=$2
TORRENT_LABEL=$3

UTILISATEUR="sanpaille"

if [ $TORRENT_LABEL = "tv" ]
then

filebot --lang en -script fn:amc --output "/home/$UTILISATEUR/Media" --log-file "/home/$UTILISATEUR/.session/amc.log" --action copy --conflict override -non-strict --db TheTVDB --lang fr --def plex=localhost:xyFSxWpHhuVsafsUZ2Wa --def artwork=y "seriesFormat={output}/TV/{n}/{'Season '+s}/{n} - {s00e00} - {t}" "ut_dir=/home/sanpaille/torrents/$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &

elif [ $TORRENT_LABEL = "movie" ]
then

filebot --lang en -script fn:amc --output "/home/$UTILISATEUR/Media" --log-file "/home/$UTILISATEUR/.session/amc.log" --action copy --conflict override -non-strict --db TheTVDB --lang fr --def plex=localhost:xyFSxWpHhuVsafsUZ2Wa --def artwork=y "movieFormat={output}/Movie/{n} ({y})/{n} ({y})" "ut_dir=/home/sanpaille/torrents/$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &

elif [ $TORRENT_LABEL = "music" ]
then

filebot --lang en -script fn:amc --output "/home/$UTILISATEUR/Media" --log-file "/home/$UTILISATEUR/.session/amc.log" --action copy --conflict override -non-strict --def plex=localhost:xyFSxWpHhuVsafsUZ2Wa --def artwork=y  --def music=y "musicFormat={output}/Music/{albumartist}/{album}/{t}" "ut_dir=/home/sanpaille/torrents/$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &

elif [ $TORRENT_LABEL = "spectacles" ]
then
filebot --lang fr -script fn:amc --output "/home/$UTILISATEUR/Media/" --log-file "/home/$UTILISATEUR/.session/amc.log" --action copy --conflict override -non-strict --db themoviedb --lang fr --def plex=localhost:xyFSxWpHhuVsafsUZ2Wa --def artwork=y "movieFormat={output}/Spectacles/{n} ({y})/{n} ({y})" "ut_dir=/home/sanpaille/torrents/$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &

elif [ $TORRENT_LABEL = "Porn" ]
then
filebot --lang fr -script fn:amc --output "/home/$UTILISATEUR/Media/" --log-file "/home/$UTILISATEUR/.session/amc.log" --action move --conflict override -non-strict --db imdb --def plex=localhost:xyFSxWpHhuVsafsUZ2Wa --def artwork=y "movieFormat={output}/Porn/{n} ({y})/{n} ({y})" "ut_dir=/home/sanpaille/torrents/$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &

elif [ $TORRENT_LABEL = "concerts" ]
then
filebot --lang fr -script fn:amc --output "/home/$UTILISATEUR/Media/" --log-file "/home/$UTILISATEUR/.session/amc.log" --action copy --conflict override -non-strict --db themoviedb --lang fr --def plex=localhost:xyFSxWpHhuVsafsUZ2Wa --def artwork=y "movieFormat={output}/Concerts/{n} ({y})/{n} ({y})" "ut_dir=/home/sanpaille/torrents/$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &

elif [ $TORRENT_LABEL = "anime" ]
then
filebot --lang en -script fn:amc --output "/home/$UTILISATEUR/Media" --log-file "/home/$UTILISATEUR/.session/amc.log" --action copy --conflict override -non-strict --db TheTVDB --lang fr --def plex=localhost:xyFSxWpHhuVsafsUZ2Wa --def artwork=y "animeFormat=Anime/{n}/{n}.S{(episode.season ? s : 1).pad(2)}E{e.pad(2)}.{t}" "ut_dir=/home/sanpaille/torrents/$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &

fi
sanpaille
Posts: 6
Joined: 05 Dec 2019, 12:44

Re: amc script no work "no such file found"

Post by sanpaille »

And i see a another error ; i have installed my license but apparently dont work ?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: amc script no work "no such file found"

Post by rednoah »

1. This message means that you have not installed your license:

Code: Select all

LicenseError: UNREGISTERED
:?: How did you install your license? How did you confirm that your license is installed?

:idea: The filebot -license command can be used to install a license. The filebot -script fn:sysinfo command can be used to confirm that your license is installed.

:!: Note that each user has it's own $HOME and thus it's own independent FileBot application data folder, and thus you will need to install your license for each user that is calling filebot.



2. This message means that the amc script is called without any input arguments, hence there is nothing to do:

Code: Select all

No files selected for processing
:?: How are you passing input arguments onto the amc script script? How did you confirm that the amc script is indeed called with valid input arguments that exist?

:idea: Your script is the glue logic that passes file paths from your upstream torrent client, to the downstream filebot call. If I was trying to figure out where input arguments are coming from, I'd start there.

:idea: Permissions are typically the root cause for any kind of "why does filebot not see my files when they're clearly there" kinda issue.




:idea: Please read Shell Script Debugging for Beginners.

:idea: Please read How to Request Help.




EDIT:

:!: This file path clearly doesn't exist, which explains why FileBot can't find any files for processing in this particular non-existent folder:

Code: Select all

/home/sanpaille/torrents//home/sanpaille/torrents/V.Wars.2019.S01.1080p.NF.WEB.DDP5.1.x264-AX
:idea: Please read the FAQ and How to Request Help.
sanpaille
Posts: 6
Joined: 05 Dec 2019, 12:44

Re: amc script no work "no such file found"

Post by sanpaille »

For first question :

my sricpt was called by ending torrent in rtorrent.rc : ( by system.method.kry)

Code: Select all

encoding_list = UTF-8
port_range = 45000-65000
port_random = no
check_hash = no
directory = /home/sanpaille/torrents
session = /home/sanpaille/.session
encryption = allow_incoming, try_outgoing, enable_retry
schedule = watch_directory,1,1,"load_start=/home/sanpaille/watch/*.torrent"
schedule = untied_directory,5,5,"stop_untied=/home/sanpaille/watch/*.torrent"
schedule = espace_disque_insuffisant,1,30,close_low_diskspace=500M
use_udp_trackers = yes
dht = off
peer_exchange = no
min_peers = 40
max_peers = 100
min_peers_seed = 10
max_peers_seed = 50
max_uploads = 15
execute = {sh,-c,/usr/bin/php /var/www/rutorrent/php/initplugins.php sanpaille &}
system.method.set_key=event.download.finished,filebot_amc,"execute={/home/sanpaille/Scripts//rtorrent-postprocess,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"

so , download finished call => rtorrent.rc => rtorrent-postprocess => filebot amc => is that?

For license : i do this :

Code: Select all

filebot --license /path/to/FileBot_License_P1********.psm
root@ns504964:~# filebot -script fn:sysinfo
FileBot 4.8.5 (r6224)
JNA Native: 5.2.2
MediaInfo: 18.12
7-Zip-JBinding: 9.20
Chromaprint: java.io.IOException: Cannot run program "/usr/share/filebot/lib/fpcalc": error=13, Permission non accordée
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: Java(TM) SE Runtime Environment 11.0.5
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 40 MB Used Memory
OS: Linux (amd64)
HW: Linux ns504964 4.9.58-xxxx-std-ipv6-64 #1 SMP Mon Oct 23 11:35:59 CEST 2017 x86_64 GNU/Linux
DATA: /root/.filebot
Package: DEB
License: FileBot License P10567483 (Valid-Until: 2020-12-09)
Done ヾ(@⌒ー⌒@)ノ

User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: amc script no work "no such file found"

Post by rednoah »

1.
You're running as root:

Code: Select all

DATA: /root/.filebot
:idea: Presumably, rT is running as other user not root, so you'll need to install your license for other user as well.



2.
You'll need to fix your glue logic scripts to pass correct file paths. Your file system. Your file paths. But the issue above is obviously caused by putting things together badly.

GOOD:

Code: Select all

/home/sanpaille/torrents/V.Wars.2019.S01.1080p.NF.WEB.DDP5.1.x264-AX
BAD:

Code: Select all

/home/sanpaille/torrents//home/sanpaille/torrents/V.Wars.2019.S01.1080p.NF.WEB.DDP5.1.x264-AX

Hence...


YES, because $TORRENT_PATH is already the absolute path:

Code: Select all

"ut_dir=$TORRENT_PATH"
NO, because $TORRENT_PATH is already the absolute path:

Code: Select all

"ut_dir=/home/sanpaille/torrents/$TORRENT_PATH"
:idea: Please read the FAQ and How to Request Help.
Post Reply