help with AMC rutorrent

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
superm4n
Donor
Posts: 15
Joined: 30 Jun 2017, 14:27

help with AMC rutorrent

Post by superm4n »

hi, ive installed the latest version of filebot, followed the instructions for the rtorrent.rc edit but now when i try and start rtorrent i get this

Code: Select all

Error in option file: ~/.rtorrent.rc:84: Could not find '='.
i have tried both types of command (the original and the updated one for newer rtorrent)

i wasnt sure if i had to manually change the 'pwd' to where my script is so ive tried it with and without on both commands
i added the command to the bottom of my rtorrent.rc

Code: Select all

dht = disable

# UDP port to use for DHT.
#
# dht_port = 6881

# Enable peer exchange (for torrents not marked private)
#
peer_exchange = no

scgi_port = 127.0.0.1:5000

echo 'system.method.set_key=event.download.finished,filebot,"execute={'`pwd`/rtorrent-postprocess.sh',$d.get_base_path=,$d.get_name=,$d.get_custom1=}"' >> ~/.rtorrent.rc
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: help with AMC rutorrent

Post by rednoah »

This is a command that will add a line to the configuration file:

Code: Select all

echo 'system.method.set_key=event.download.finished,filebot,"execute={'`pwd`/rtorrent-postprocess.sh',$d.get_base_path=,$d.get_name=,$d.get_custom1=}"' >> ~/.rtorrent.rc
You just need to run the 3rd command, just like the 1st and 2nd command. Instead, you manually edited the configuration file, and copy & pasted a bash command, and not a rtorrent configuration line. ;)


e.g. Command:

Code: Select all

$ echo 'system.method.set_key=event.download.finished,filebot,"execute={'`pwd`/rtorrent-postprocess.sh',$d.get_base_path=,$d.get_name=,$d.get_custom1=}"'
e.g. Output:

Code: Select all

system.method.set_key=event.download.finished,filebot,"execute={/Users/Me/rtorrent-postprocess.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
:idea: Please read the FAQ and How to Request Help.
superm4n
Donor
Posts: 15
Joined: 30 Jun 2017, 14:27

Re: help with AMC rutorrent

Post by superm4n »

Haha now I feel stupid I spent a whole hour searching and googling I didn't even think to just put in the terminal lol
superm4n
Donor
Posts: 15
Joined: 30 Jun 2017, 14:27

Re: help with AMC rutorrent

Post by superm4n »

one more question, i would like to execute the same filebot settings from the amc script on an existing folder of movies and tv shows so that filebot will copy, rename organise and download artwork in the exact same format

i had a go already and run it on test but it doesnt look like it will create the folders or download the artwork from the output in terminal

Code: Select all

:/home/plex/newlibrary/media/movies$ filebot -rename "./" --output "/home/plex/media" -non-strict --action test --conflict skip --def unsorted=y music=y artwork=y
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/plex/newlibrary/media/movies/10 Cloverfield Lane (2016).mkv]
[TEST] from [/home/plex/newlibrary/media/movies/10 Cloverfield Lane (2016).mkv] to [/home/plex/media/10 Cloverfield Lane (2016).mkv]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/plex/newlibrary/media/movies/13 Hours The Secret Soldiers of Benghazi (2016).mkv]
[TEST] from [/home/plex/newlibrary/media/movies/13 Hours The Secret Soldiers of Benghazi (2016).mkv] to [/home/plex/media/13 Hours The Secret Soldiers of Benghazi (2016).mkv]
Processed 1 files
also does the AMC script replace nuked files with proper? if so how do i set that?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: help with AMC rutorrent

Post by rednoah »

1.
Read the rtorrent-postprocess.sh script:

Code: Select all

cat rtorrent-postprocess.sh
Now you know how it works, you can call it yourself (with 3 arguments), and how the script is calling filebot based on the parameters you pass into the script. ;)


2.
I think you also want to look into --conflict auto.
:idea: Please read the FAQ and How to Request Help.
superm4n
Donor
Posts: 15
Joined: 30 Jun 2017, 14:27

Re: help with AMC rutorrent

Post by superm4n »

ok i see from the script that rutorrent passes the directory path, torrent name and torrent label and calls the script for that individual torrent file that has completed.

do i need to edit a version of this script and replace the $1 with path to files not sure what id put for the torrent name $2 and Label $3 as these would be different for every file in my folder so ill try removing thoses arguments and see if it works.

ok so i created a copy of the script and removed $2 $3 from the config input and command
but the script clearly needs $2 (title?) how do i set that variable to the actual file names.

Edited AMC script

Code: Select all

# Input Parameters
ARG_PATH="/home/plex/newlibrary/movies"

# Configuration
CONFIG_OUTPUT="/home/plex/media"

filebot -script fn:amc --output "$CONFIG_OUTPUT" --action duplicate --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi" &


AMC Log Ouput

Code: Select all

Run script [fn:amc] at [Sun Jul 16 12:31:41 CEST 2017]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = .excludes
Parameter: ut_dir = /home/plex/newlibrary/movies
Parameter: ut_kind = multi
Use excludes: /home/plex/media/.excludes (24)
No files selected for processing
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: help with AMC rutorrent

Post by rednoah »

Why would you edit the script when you can just call it?

e.g. do what rtorrent does:

Code: Select all

./rtorrent-postprocess.sh "/path/to/complete/Avatar.2009" "Avatar.2009" "Movie"
e.g. process all your movies:

Code: Select all

./rtorrent-postprocess.sh "/path/to/Movies" "All Movies" "Movie"
:idea: Please read the FAQ and How to Request Help.
superm4n
Donor
Posts: 15
Joined: 30 Jun 2017, 14:27

Re: help with AMC rutorrent

Post by superm4n »

wow as simple as that? i always overthink everything.
thanks again
Post Reply