How to: rTorrent + ruTorrent + Sickbeard Seamless

If you've made an extra_script, made a 3rd party tool, or just added some functionality in a fork you can post about it here.

How to: rTorrent + ruTorrent + Sickbeard Seamless

Postby xombiemp » Tue Jan 10, 2012 5:48 pm

*Notice*: This guide is pretty old. You should use this newer guide I wrote http://sickbeard.com/forums/viewtopic.php?f=9&t=4086. The newer guide is much easier to set up than this one and is how my server is currently setup.

Background

Sickbeard is an awesome piece of software that automates downloading TV shows better than a traditional DVR. The reason I say it is better than a DVR is because it downloads the shows commercial free and, depending on where you live, the show may download before it even airs in your timezone.
Sickbeard was built to be used with Usenet and has limited support for torrent users. This completely automated setup falls apart a bit when using Sickbeard with torrents. The problem is that when using torrents you probably want to be able to seed your TV show after you finish downloading. You might think that you could just check the Keep Original Files option in Sickbeard and be set. Well, if you’ve tried that then you know that with the Scan and Process option in Sickbeard enabled it will keep processing any files in the TV Download Dir over and over until it is deleted. This means that while you are seeding, Sickbeard will copy, rename and place your TV Show every 10 minutes or so. We definitely do not want that.
Another option is to set up watched directories and run a script that copies the TV show to a new directory that Sickbeard then processes. This will work, but it’s a pain because you will duplicate the TV show, doubling your used hard drive space while you are seeding; not to mention you will have to set up the watched directories with a third party tool.
Well, forget all that, because I’m going to guide you through setting up rtorrent + rutorrent + sickbeard to completely automate your TV downloading. It will be just as automated and smooth as using Usenet.

Prerequisites

  • Ubuntu Server 10.04 (New versions should be the same, I just used this version)
  • Storage for your TV shows connected to server
  • TVTorrents.com or BTN account (this is the hardest part of the guide because TVTorrents and BTN are closed to registrations, meaning you need to be invited by a member. The way I got in to TVTorrents was through http://www.torrent-invites.com/ You can create a free account at torrent-invites.com and people give away their invites. You usually have to provide proof of your seeding ratio from other torrent trackers to get an invite. Read through the rules and and follow directions and you’ll have an invite in no time!)

End Result

Sickbeard already has a post processing script built in for Sabnzbd, and it turns out that we can use the same script as long as we just have rtorrent pass it the variables that it’s expecting. You will have rtorrent configured with two different ratio groups. Each group is based on two different watch directories for torrents. One is for sickbeard to place torrents in and the other is for normal, manually added torrents, since you’ll probably want to use rtorrent for other torrents besides the ones from sickbeard. The following diagram illustrates the directories you will set up and where each group of torrents will end up.

Image

Group 1 process:
  • Sickbeard will download the .torrent file from tvtorrents.com and place it in the autowatch directory.
  • rTorrent will add the torrent to ratio Group 1 and will begin to download the torrent in the download directory, as well as delete the .torrent file from the autowatch directory.
  • when it finishes downloading, rTorrent will move the file to temp-process and call the sickbeard post processing script, passing it the variables it needs. It will then set the seeding directory for the torrent to autoseed.
  • Sickbeard will move the file to its final location and rename it nicely.
  • Sickbeard will then call another script using the extra_scripts advanced option. This script will create a symbolic link to the final file that is named the exact same as the original torrent and place it in the autoseed directory. This all happens so fast that rtorrent will continue to seed the torrent without a hiccup.
  • rTorrent will seed to a ratio of 2.0 (you can change that to whatever) then it will stop the torrent, delete it from rtorrent and delete the symbolic link in autoseed.

Group 2 process:
  • you manually drop a .torrent file in the watch directory or add a torrent via the rutorrent web interface.
  • rTorrent will add the torrent to ratio Group 2 and will begin to download the torrent in the download directory, as well as delete the .torrent file from the watch directory if applicable.
  • when it finishes downloading, rTorrent will move the file to the complete directory and will seed from there like normal.
  • The torrent will seed to a ratio of 2.0 (again, you can change this) then it will stop the torrent.

So Sickbeard is completely automated while leaving you with a normally functioning rTorrent to download manual torrents as well. Sound good? Lets get it set up.

Setting it up

Login as root and make sure your Ubuntu server is all up to date. Then execute these commands.

rTorrent
Install Prereqs
Code: Select all
apt-get install git-core subversion build-essential automake libtool libcppunit-dev libcurl4-openssl-dev libsigc++-2.0-dev zip unzip rar unrar curl libncurses-dev

Code: Select all
apt-get install apache2 php5 php5-cli php5-curl libapache2-mod-scgi

Code: Select all
a2enmod scgi
a2enmod ssl


Install xmlrpc from svn
Code: Select all
mkdir -p /root/rtorrent/install

Code: Select all
cd /root/rtorrent/install

Code: Select all
svn checkout http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced xmlrpc-c

Code: Select all
cd xmlrpc-c

Code: Select all
./configure

Code: Select all
make

Code: Select all
make install


Install libtorrent
Code: Select all
cd /root/rtorrent/install

Code: Select all
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.6.tar.gz

Code: Select all
tar xzfv libtorrent-0.12.6.tar.gz

Code: Select all
cd libtorrent-0.12.6

Code: Select all
./configure

Code: Select all
make

Code: Select all
make install


Install rtorrent
Code: Select all
cd /root/rtorrent/install

Code: Select all
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz

Code: Select all
tar xzfv rtorrent-0.8.6.tar.gz

Code: Select all
cd rtorrent-0.8.6

Code: Select all
./configure --with-xmlrpc-c

Code: Select all
make

Code: Select all
make install

Code: Select all
ldconfig


Make Directories
Code: Select all
mkdir /root/rtorrent/session


Make 6 directories for torrent downloading and processing. Make these on the hard drive that you will download torrents to.
  • autowatch
  • autoseed
  • watch
  • download
  • temp-process
  • complete

Give these folders full permissions by executing this on the parent directory:
Code: Select all
chmod -R 777 /PATH/TO/PARENT



Make Config File and Boot Script
Make /root/.rtorrent.rc with your favorite editor (vim, nano, etc.) and paste this in:
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.

# Maximum and minimum number of peers to connect to per torrent.
min_peers = 40
max_peers = 100

# Same as above but for seeding completed torrents (-1 = same as downloading)
min_peers_seed = 10
max_peers_seed = -1

# Maximum number of simultanious uploads per torrent.
#max_uploads = 15

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 0
upload_rate = 1000

# Default directory to save the downloaded torrents.
directory = /CHANGE/THIS/PATH/download

# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
session = /root/rtorrent/session

# Group 1 - Auto - seed until 2.0 then delete data
group.insert_persistent_view = group_1
group.group_1.ratio.enable=
group.group_1.ratio.max.set=200

# Group 2 - Manual - seed until 2.0 then stop torrent
group.insert_persistent_view = group_2
group.group_2.ratio.enable=
group.group_2.ratio.max.set=200


# Watch a directory for new torrents
schedule = watch_directory_1,5,5,"load_start=/CHANGE/THIS/PATH/autowatch/*.torrent, d.set_custom1=tv, \"d.set_custom=isauto,/CHANGE/THIS/PATH/temp-process/\""
schedule = watch_directory_2,5,5,"load_start=/CHANGE/THIS/PATH/watch/*.torrent"

# Set ratio group based on isauto
system.method.set_key = event.download.inserted_new,set_ratio,"branch=d.get_custom=isauto,view.set_visible=group_1,view.set_visible=group_2"

# Set autodir to concatination of isauto and torrent name
system.method.set_key = event.download.inserted_new,set_autodir,"d.set_custom=autodir,\"$cat=$d.get_custom=isauto,$d.get_name=\""

# Set manualdir to concatination of complete dir and label name
system.method.set_key = event.download.inserted_new,set_manualdir,"d.set_custom=manualdir,\"$cat=/CHANGE/THIS/PATH/complete/,$d.get_custom1=\""

# Set move to dir in movedir
system.method.set_key = event.download.inserted_new,set_movedir,"branch=d.get_custom=isauto,\"d.set_custom=movedir,$d.get_custom=autodir\",\"d.set_custom=movedir,$d.get_custom=manualdir\""

# Delete .torrent
system.method.set_key = event.download.inserted_new,del_tor,"execute={rm,-rf,--,$d.get_loaded_file=}"

# Close torrents when diskspace is low.
#schedule = low_diskspace,5,60,close_low_diskspace=100M

# Move torrent data to another folder when download is complete
system.method.set_key = event.download.finished,move_complete,"execute=mkdir,-p,$d.get_custom=movedir;d.set_directory=$d.get_custom=movedir;execute=mv,-u,$d.get_base_path=,$d.get_custom=movedir"

# Set autoseed dirctory if Auto group
system.method.set_key = event.download.finished,move_dir,"branch=d.get_custom=isauto,d.set_directory=/CHANGE/THIS/PATH/autoseed/"

# Call rtorrentToSickBeard.py if in Auto group
system.method.set_key = event.download.finished,toSickbeard,"branch=d.get_custom=isauto,\"execute={/root/sickbeard/autoProcessTV/rtorrentToSickBeard.py,$d.get_custom=movedir,$d.get_name=}\""

# Set actions for groups completed ratio
system.method.set = group.group_1.ratio.command, d.close=, "execute={rm,-rf,--,$d.get_base_path=}", d.erase=
system.method.set = group.group_2.ratio.command, d.close=

# The ip address reported to the tracker.
#ip = 127.0.0.1
#ip = rakshasa.no

# The ip address the listening socket and outgoing connections is
# bound to.
#bind = 127.0.0.1
#bind = rakshasa.no

# Port range to use for listening.
port_range = 49155-49155

# Start opening ports at a random position within the port range.
#port_random = no

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
check_hash = no

# Set whetever the client should try to connect to UDP trackers.
use_udp_trackers = yes

# Alternative calls to bind and ip that should handle dynamic ip's.
#schedule = ip_tick,0,1800,ip=rakshasa
#schedule = bind_tick,0,1800,bind=rakshasa

# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
# encryption = allow_incoming,enable_retry,prefer_plaintext
encryption = allow_incoming,try_outgoing,enable_retry

# Enable DHT support for trackerless torrents or when all trackers are down.
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
#
dht = auto

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

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

#
# Do not modify the following parameters unless you know what you're doing.
#

# Hash read-ahead controls how many MB to request the kernel to read
# ahead. If the value is too low the disk may not be fully utilized,
# while if too high the kernel might not be able to keep the read
# pages in memory thus end up trashing.
#hash_read_ahead = 10

# Interval between attempts to check the hash, in milliseconds.
#hash_interval = 100

#log.execute=/var/log/rtorrent.log

# Number of attempts to check the hash while using the mincore status,
# before forcing. Overworked systems might need lower values to get a
# decent hash checking rate.
#hash_max_tries = 10
scgi_port = 127.0.0.1:5000
execute = {sh,-c,/usr/bin/php /var/www/rutorrent/php/initplugins.php CHANGENAME &}


Look for where it says /CHANGE/THIS/PATH six times and edit the path for your setup. Also look for CHANGENAME at the bottom and change it to the user that you want to use for ruTorrent login. Change any other random options that you want.

Make /etc/init.d/rtorrentd and paste
#!/bin/sh
### BEGIN INIT INFO
# Provides: rtorrent_autostart
# Required-Start: $local_fs $remote_fs $network $syslog $netdaemons
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: rtorrent script using screen(1)
# Description: rtorrent script using screen(1) to keep torrents working without the user logging in
### END INIT INFO

# system user to run as
user="root"

# the system group to run as, not implemented, see d_start for beginning implementation
# group=`id -ng "$user"`

# the full path to the filename where you store your rtorrent configuration
config="`su -c 'echo $HOME' $user`/.rtorrent.rc"

# set of options to run with
options=""

# default directory for screen, needs to be an absolute path
base="`su -c 'echo $HOME' $user`"

# name of screen session
srnname="rtorrentd"

# file to log to (makes for easier debugging if something goes wrong)
logfile="/var/log/rtorrentInit.log"
###########################
###DO NOT EDIT PAST HERE###
###########################
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin
DESC=$srnname
NAME=rtorrent
DAEMON=$NAME
SCRIPTNAME=/etc/init.d/$srnname

checkcnfg() {
exists=0
for i in `echo "$PATH" | tr ':' '\n'` ; do
if [ -f $i/$NAME ] ; then
exists=1
break
fi
done
if [ $exists -eq 0 ] ; then
echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$logfile" >&2
exit 3
fi
if ! [ -r "${config}" ] ; then
echo "cannot find readable config ${config}. check that it is there and permissions are appropriate" | tee -a "$logfile" >&2
exit 3
fi
session=`getsession "$config"`
if ! [ -d "${session}" ] ; then
echo "cannot find readable session directory ${session} from config ${config}. check permissions" | tee -a "$logfile" >&2
exit 3
fi
}

d_start() {
[ -d "${base}" ] && cd "${base}"
stty stop undef && stty start undef
su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "screen -dm -S ${srnname} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2
# this works for the screen command, but starting rtorrent below adopts screen session gid
# even if it is not the screen session we started (e.g. running under an undesirable gid
#su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "sg \"$group\" -c \"screen -fn -dm -S ${srnname} 2>&1 1>/dev/null\"" ${user} | tee -a "$logfile" >&2
su -c "screen -S "${srnname}" -X screen rtorrent ${options} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2
}

d_stop() {
session=`getsession "$config"`
if ! [ -s ${session}/rtorrent.lock ] ; then
return
fi
pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed "s/[^0-9]//g"`
if ps -A | grep -sq ${pid}.*rtorrent ; then # make sure the pid doesn't belong to another process
kill -s INT ${pid}
fi
}

getsession() {
session=`cat "$1" | grep "^[[:space:]]*session[[:space:]]*=" | sed "s/^[[:space:]]*session[[:space:]]*=[[:space:]]*//" `
echo $session
}

checkcnfg

case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0


Code: Select all
chmod +x /etc/init.d/rtorrentd

Code: Select all
update-rc.d rtorrentd defaults


Create SSL certificate
Code: Select all
openssl req $@ -new -x509 -days 36500 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem


You will now need to fill out a series of questions for your certificate

Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:CA
Locality Name (eg, city) []:San Diego
Organization Name (eg, company) [Internet Widgits Pty Ltd]:mycorp, LLC
Organizational Unit Name (eg, section) []:Sales
Common Name (eg, YOUR name) []: mydoman.com
Email Address []:you@mycorp.com


Most of the fields are self-explanatory. If you are going to use a domain name to access rutorrent, then make sure the Common Name matches your domain name.

Create password for rutorrent
Code: Select all
htpasswd -c /etc/apache2/rutorrent_passwd USERNAME


Create Apache config
Edit /etc/apache2/httpd.conf and paste
<VirtualHost *:80>
</VirtualHost>
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/apache2/apache.pem
DocumentRoot /var/www

<Directory />
AllowOverride None
Order deny,allow
Deny from all
Options -Indexes
</Directory>
<Location />
AuthType Basic
AuthName "ruTorrent Login"
AuthUserFile "/etc/apache2/rutorrent_passwd"
Require valid-user
Order allow,deny
Allow from all
</Location>
<Location ~ "^/rutorrent/(conf|share)">
Order deny,allow
Deny from all
</Location>
<Location ~ "/\\.svn">
Order deny,allow
Deny from all
</Location>
<Location "/RPC2">
AuthType Basic
AuthName "ruTorrent Login"
AuthUserFile "/etc/apache2/rutorrent_passwd"
Require user CHANGEUSER
</Location>
</VirtualHost>
SCGIMount /RPC2 127.0.0.1:5000

Edit CHANGEUSER to match the user you created with rutorrent password command. Obviously you can edit other things for your setup.
Last edited by xombiemp on Fri Jan 04, 2013 11:43 am, edited 12 times in total.
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: How to: rTorrent + ruTorrent + Sickbeard Seamless

Postby xombiemp » Tue Jan 10, 2012 5:49 pm

ruTorrent
Code: Select all
cd /var/www/

Code: Select all
svn checkout http://rutorrent.googlecode.com/svn/trunk/rutorrent

Code: Select all
cd /var/www/rutorrent/plugins/

Code: Select all
svn checkout http://rutorrent.googlecode.com/svn/trunk/plugins/PLUGINNAME

replace PLUGINNAME with the name of the plugin and repeat for all plugins (_getdir check_port chunks datadir diskspace erasedata history seedingtime tracklabels trafic) these are the ones I use.
Code: Select all
svn checkout http://svn.rutorrent.org/svn/filemanager/trunk/filemanager

Code: Select all
chown -R www-data:www-data /var/www/rutorrent


Edit /var/www/rutorrent/plugins/filemanager/conf.php and make these changes:

$pathToExternals['rar'] = '/usr/bin/rar';
$pathToExternals['zip'] = '/usr/bin/zip';
$pathToExternals['unzip'] = '/usr/bin/unzip';
$pathToExternals['tar'] = '/bin/tar';


ruTorrent Update Script
Create file /usr/local/bin/update-rutorrent and paste:
#!/bin/bash

updated="no"

rutorrent_path="/var/www/rutorrent"
plugins_path="/var/www/rutorrent/plugins"

rutorrent_svn="http://rutorrent.googlecode.com/svn/trunk/rutorrent"
plugins_svn="http://rutorrent.googlecode.com/svn/trunk/plugins"
filemanager_svn="http://svn.rutorrent.org/svn/filemanager/trunk/filemanager"

# _getdir autotools check_port chunks datadir diskspace erasedata ratio seedingtime
plugins=(_getdir check_port chunks datadir diskspace erasedata history seedingtime tracklabels trafic)


echo -e "UPDATING rutorrent"
cd $rutorrent_path
oldsvn=$(svn info | grep "Revision" | cut -c11-)
newsvn=$(svn info $rutorrent_svn | grep "Revision" | cut -c11-)
if [ "$newsvn" != "$oldsvn" ] ; then
service rtorrentd stop
svn up
echo -e "rutorrent updated from $oldsvn to $newsvn\n"
sleep 2
updated="yes"
else
echo -e "rutorrent is already at the latest version: $newsvn\n"
sleep 2
fi


echo -e "UPDATING plugins"
for plugin in ${plugins[*]}; do
cd $plugins_path/$plugin
oldsvn=$(svn info | grep "Revision" | cut -c11-)
newsvn=$(svn info $plugins_svn/$plugin | grep "Revision" | cut -c11-)
if [ "$newsvn" != "$oldsvn" ] ; then
service rtorrentd stop
svn up
echo -e "$plugin updated from $oldsvn to $newsvn\n"
sleep 2
updated="yes"
else
echo -e "$plugin is already at the latest version: $newsvn\n"
sleep 2
fi
done


cd $plugins_path/filemanager
oldsvn=$(svn info | grep "Revision" | cut -c11-)
newsvn=$(svn info $filemanager_svn | grep "Revision" | cut -c11-)
if [ "$newsvn" != "$oldsvn" ] ; then
service rtorrentd stop
svn up
echo -e "filemanager updated from $oldsvn to $newsvn\n"
sleep 2
updated="yes"
else
echo -e "filemanager is already at the latest version: $newsvn\n"
sleep 2
fi


if [ "$updated" == "yes" ] ; then
echo -e "Updates were installed. Restarting rtorrent..."
service rtorrentd stop
service apache2 restart
service rtorrentd start
else
echo -e "Already running the latest version of everything!\n"
fi

Code: Select all
chmod +x /usr/local/bin/update-rutorrent

This is a script you can run to update rutorrent and all the plugins from svn. Very helpful for keeping you up to date. Just edit the plugins array to include all the plugins you have installed.

Edit /var/www/rutorrent/conf/config.php and change $topDirectory to the root of the drive where your torrents are downloaded.

Sickbeard
Code: Select all
cd /root/

Code: Select all
apt-get install python-cheetah

Code: Select all
git clone git://github.com/midgetspy/Sick-Beard.git sickbeard

Code: Select all
cd sickbeard/

Code: Select all
cp init.ubuntu /etc/init.d/sickbeard

Code: Select all
chmod +x /etc/init.d/sickbeard


Edit /etc/init.d/sickbeard and change:
APP_PATH=/root/sickbeard

# user
RUN_AS=root

# data directory
DATA_DIR=/root/sickbeard

Code: Select all
update-rc.d sickbeard defaults

Code: Select all
cd autoProcessTV/

Code: Select all
cp autoProcessTV.cfg.sample autoProcessTV.cfg


Edit autoProcessTV.cfg with your settings (just choose a username and password)

Code: Select all
cp sabToSickBeard.py rtorrentToSickBeard.py

Edit newly created rtorrentToSickBeard.py and change the word SABnzbd to rtorrent. (It's just a comment and not important, but I thought we might as well change it.)

Create /root/sickbeard/sickbeardPostProcess.sh and paste:
#!/bin/bash
filePath="$1"
originalNameTemp="$2"
originalName=${originalNameTemp##*/}
seedDir="/CHANGE/THIS/PATH/autoseed"
echo "creating link $seedDir/$originalName to $filePath"
ln -s "$filePath" "$seedDir/$originalName"

edit /CHANGE/THIS/PATH to your setup

Code: Select all
chmod +x /root/sickbeard/sickbeardPostProcess.sh

Code: Select all
/etc/init.d/rtorrentd start

Code: Select all
/etc/init.d/sickbeard start

Code: Select all
/etc/init.d/sickbeard stop


Edit /root/sickbeard/config.ini and change
extra_scripts = /root/sickbeard/sickbeardPostProcess.sh


Make sure that you use the FULL path to the script or else the script will not run!

Code: Select all
/etc/init.d/sickbeard start


Code: Select all
/etc/init.d/apache2 restart



Samba
This is how you will be able to stream your TV shows to a media center in your house. We will set up a samba file share that XBMC can connect to for example.
Code: Select all
apt-get install samba smbfs


Edit /etc/samba/smb.conf and replace the contents with:
[global]
workgroup = WORKGROUP
server string = %h server
log file = /var/log/samba/log.%m
max log size = 1000
display charset = LOCALE
unix charset = UTF-8
dos charset = CP850
encrypt passwords = true
security = user
passdb backend = tdbsam
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = no
obey pam restrictions = yes
load printers = no
show add printer wizard = no
printing = none
printcap name = /dev/null
disable spoolss = yes
syslog = 0
panic action = /usr/share/samba/panic-action %d
unix extensions = no

[CHANGE-TO-SHARENAME]
comment = data
path = /CHANGE/TO/SHARE/PATH
read only = no
writeable = yes
oplocks = yes
level2 oplocks = yes
force security mode = 0
dos filemode = yes
dos filetime resolution = yes
dos filetimes = yes
fake directory create times = yes
browseable = yes
csc policy = manual
share modes = yes
veto oplock files = /*.mdb/*.MDB/*.dbf/*.DBF/
veto files = /*:Zone.Identifier:*/
create mode = 0770
directory mode = 2770
printable = no
guest ok = no
hosts allow = 192.168.0.0/16 10.0.0.0/8
hosts readonly allow =
store dos attributes = yes
map acl inherit = yes

Edit CHANGE-TO-SHARENAME and /CHANGE/TO/SHARE/PATH for your setup.
Last edited by xombiemp on Fri Apr 27, 2012 8:48 am, edited 9 times in total.
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: How to: rTorrent + ruTorrent + Sickbeard Seamless

Postby xombiemp » Tue Jan 10, 2012 5:49 pm

The rest of the configuration is done from the web gui’s, so let’s login from a web browser on the same network.

First browse to https://IP.OF.UBUNTU.SERVER/rutorrent
Login with the username and password you created earlier.
Click on the gear cog to enter the settings.
Most of the settings are hard wired in the .rtorrent.rc file but there are a couple things to change:
In General uncheck Confirm when deleting torrents.
In History I only check Deletion. This is nice because sickbeard could download a torrent, seed it to 2.0, and delete it all while you are sleeping. So the History plugin will let you see a record of when it was deleted and what your ratio was, just for your sanity.
That’s about it for rutorrent configuration.

Now browse to http://IP.OF.UBUNTU.SERVER:8081
Click on the Config tab and click General
Image
Put the username and password in that you put in autoProcessTV.cfg. You don’t need an API key but you can generate one if you want. Be sure to click on Save Changes between each page.


Click on Search Settings
Image
You can change the search frequency to a longer interval if you want. Check Search Torrents and browse to your autowatch dir.

Click on Search Providers
Image
Check TvTorrents and configure the provider. To find your Digest and Hash, login to TvTorrents and go to your rss feed. In the url you will see your digest and hash.


Click on Post Processing
Image
Match my post processing settings. Notice that we don’t have to use Keep Original Files or Scan and Process.
Metadata is up to you. This is how I have mine set up for XBMC.

Image
Episode Naming is also up to you. This is how I like my episodes renamed.

Now you can add your shows to Sickbeard like normal. This setup has been working great for me and completely automates the Sickbeard process!
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: How to: rTorrent + ruTorrent + Sickbeard Seamless

Postby xombiemp » Tue Jan 10, 2012 5:50 pm

Reserved
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: How to: rTorrent + ruTorrent + Sickbeard Seamless

Postby rascalli » Wed Jan 11, 2012 12:30 pm

Looks good.

Only wondering how this handels the unrarring , as I don't see this mentioned
NL newsserver starting €44,40 a year

Image

Hope you will use my refereal link
rascalli
 
Posts: 4913
Joined: Tue Aug 10, 2010 2:26 pm

Re: How to: rTorrent + ruTorrent + Sickbeard Seamless

Postby xombiemp » Wed Jan 11, 2012 12:40 pm

All the TV shows on TvTorrents are unrared and always will be (in accordance to their site rules). So whenever you download a show it will always just be the mkv/avi and nothing else, so we don't have to worry about unraring.

On a side note, there is a rutorrent plugin called unpack which enables manual or automatic unpacking of rars and zips for torrents from other trackers.
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: How to: rTorrent + ruTorrent + Sickbeard Seamless

Postby rascalli » Wed Jan 11, 2012 3:25 pm

Well that's good then.

unpack plugin will be a problem I guess with your script & the link it makes.
Will move this to 3rd party
NL newsserver starting €44,40 a year

Image

Hope you will use my refereal link
rascalli
 
Posts: 4913
Joined: Tue Aug 10, 2010 2:26 pm

Re: How to: rTorrent + ruTorrent + Sickbeard Seamless

Postby midna » Sat Jan 21, 2012 12:23 pm

Fantastic guide!! Thank you!

A few minor corrections/updates I would make.

"update-r.d rtorrentd defaults" should have update-rc.d
/root/sickbeard/config.ini did not exist by default and I needed to create it
rtorrentToSickBeard.py indents are lost on copy paste

I'm running another download now to see if anything else doesn't work, I'll know in a few minutes :)

So close, the torrent symlink did not get created in the seeding directory. I probably fat-fingered something, I'll look into it more later tonight.
midna
 
Posts: 6
Joined: Sat Jan 21, 2012 12:17 pm

Re: How to: rTorrent + ruTorrent + Sickbeard Seamless

Postby xombiemp » Sat Jan 21, 2012 6:13 pm

Good catches!

midna wrote:"update-r.d rtorrentd defaults" should have update-rc.d

Made that change.

midna wrote:/root/sickbeard/config.ini did not exist by default and I needed to create it

Moved this part to after you start the sickbeard process, so it should exist now.

midna wrote:rtorrentToSickBeard.py indents are lost on copy paste

This script is basically a copy of sabToSickBeard.py so I changed the instructions to just copy that to the new rtorrentToSickBeard.py and change the one word difference.

midna wrote:So close, the torrent symlink did not get created in the seeding directory. I probably fat-fingered something, I'll look into it more later tonight.


So I recently realized that custom1 is used by rutorrent to store the tags assigned to torrents. That leads me to believe that maybe other custom# are being used too and causing conflicts with the config. So I rewrote the rtorrent.rc config a bit to use custom variables defined by us instead of the built in ones. This seems to be working out great for me. I also added a little bit to the move code for the manual group, such that if you assign a tag when you add the torrent it will save it to that directory under /complete. So if you assign a tag movie it will be moved to /complete/movie and if you don't assign a tag it'll just move to /complete.

Let me know if you get it working!
Last edited by xombiemp on Thu Feb 23, 2012 10:04 am, edited 1 time in total.
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: How to: rTorrent + ruTorrent + Sickbeard Seamless

Postby midna » Sun Jan 22, 2012 5:11 pm

I tried the new rtorrent.rc and I get the following error every time a torrent gets added via sickbeard to autowatch

"Inactive: Command on torrent creation failed: Missing value argument."
midna
 
Posts: 6
Joined: Sat Jan 21, 2012 12:17 pm

Next

Return to Mobile Apps, Extra Scripts, Supplementary Tools

Who is online

Users browsing this forum: No registered users and 3 guests