Sync between rutorrent servers

das329717

Member
May 25, 2018
928
0
16
Hi All,

Firstly, rutorrent is probably the single greatest webui ever created for rtorrent and I cannot believe how far 3.0 has come since I first starting download the betas. My biggest thanks to all those involved smiley.gif

I know there is a huge amount of re-architecture involved in this kind of change but I just thought I'd mention it:

Add the ability to be able to transfer data between rutorrent installations.

Let me explain:

You would first download the plugin to each rutorrent installation you control.

You would then modify the SGCI port and ip port to uniquely identify each one.

You would then choose a torrent in the rutorrent webui and choose something like Right click --> Move to --> Remote seedbox

rutorrent would then transfer the .torrent file and begin a simple data transfer to the remote destination.

the remote destination would not start the torrent file until the files are 100% transfered (source torrent is still active), then it would start the torrent localy and remove the source data and torrent file keeping with all stats (up/down time etc).

Unfortunately I have very little programming skills, but I'm guessing some of the code from datadir and remove data plugin could be leveraged for something like this?
 

dsouvik215

Member
May 25, 2018
896
0
16
This isn't a bad idea but it's VERY difficult to Implement.

This would almost certainly have to be a bounty. I would imagine such a feature would take many hours to write (i'm going to GUESS and say 40-50 hours to get it working flawlessly)

Keep this in mind when you pledge for the bounty. I would use such a feature as well so if you actually do make the bounty i will throw in some too.


on the other hand....i've written a script which i use to transfer files which are done to my house...you might be able to alter it to help you....it' sREALLY bad because i'm not a programmer but i will post it in a bit.
 

jith45

Member
May 25, 2018
960
0
16
Code:
#! /bin/bash
LOCKFILE="/tmp/.lockfile"
RMT=[email protected]
SRC=/home/wonslung/Complete/TV/
SRC2=/home/wonslung/Complete/Movies/
DST=/tank/nas/dump/torrents/seedbox/
TMST=$SRC.timestamp
FIND=/usr/gnu/bin/find
LOG=/export/home/wonslung/log/rsync.log
IFS='
'

if [ -f $LOCKFILE ]
then
echo "lockfile, exiting"
exit 0
else
touch $LOCKFILE
fi

link() {

ssh $RMT "find ${SRC}* -type d -maxdepth 0 -newer $TMST \
-exec ln -s '{}' /home/wonslung/sync \;"

ssh $RMT "find ${SRC}* -type f -maxdepth 1 -newer $TMST \
-exec ln -s {} /home/wonslung/sync \;"


ssh $RMT "find ${SRC2}* -type d -maxdepth 0 -newer $TMST \
-exec ln -s '{}' /home/wonslung/sync \;"

ssh $RMT "find ${SRC2}* -type f -maxdepth 1 -newer $TMST \
-exec ln -s '{}' /home/wonslung/sync \;"
}

link

rsync -Lave ssh ${RMT}:/home/wonslung/sync/ $DST >> $LOG

link

rsync -Lave ssh ${RMT}:/home/wonslung/sync/ $DST >> $LOG

link

rsync -Lave ssh ${RMT}:/home/wonslung/sync/ $DST >> $LOG


shopt -s extglob

for dir in ${DST}*/
do
cd "$dir" && $FIND . -type f -name '*.rar' \( ! -name 'part*.rar' -o -name 'part01.rar' \) -exec unrar e {} \;
done
for g in ${DST}*/
do
rm ${g}*.r?? ${g}*.sfv ${g}*.nfo
done
$FIND ${DST}* -maxdepth 0 -type d -exec mv {} /tank/nas/dump/Done \;




ssh $RMT "find /home/wonslung/sync -type l -exec rm '{}' \;"

rm -f $LOCKFILE ; ssh $RMT "touch $TMST"
basically, this runs client side (i did this because i didn't want to leave a port open on my firewall at home)

it's really not that great...it's a work in progress to be honest. It relies on Auto-tools (which moves "finished" torrents to a different dir and lets them seed from there)
I think check for files newer than a timestamp file, i create a symbolic link for that dir/file in a different dir, then i use rsync to get those files, when it's done, it deletes the link and touches the timestamp file.

I've also made it unrar and move files but this is really needing work.

Things i also mean to work out are:

I need to come up with a better method of making sure files which are added durring the course of the script run get touched after the timestamp is touched just to make sure they get downloaded the next time....

I need to work out better code for unrar.
 

jith45

Member
May 25, 2018
960
0
16
just go to the "plugin development" subforum and make a post.

The post should include:

a clear and descriptive summary of what the plugin should do, how much you're pledging and any other details which are important.

for example, lets say you wanted a feature like "rss episode tracking"

you'd make the topc something like "Bounty: rss episode tracking"

then you'd make the body of the post something like
"this is a bounty for rss episode tracking. I will pay 30 dollars upon feature completion, this feature should keep track of tv episodes to prevent redownloading the same show. It should have a setting to allow or disallow 1 or more "propers" and it should have a memory of at least 30 days"


see what i mean?

be very precise because the last thing you want is someone who codes it up and expects the bounty then it not be what you want.

The cool thing about bounties are it will get more devs working on this project.
 

das329717

Member
May 25, 2018
928
0
16
Quote :
why would i ask you if i can code myslef sad.gif, i guess this will be good for all users because most of heavy users use it
i request you to try to make it possible, if its tooo hard then leave it

Yet once.
This is not very hard, but i haven't wish to do that. Because i already have on category panel all, what i want. If you really need these categories - you can
1) add its by own
2) wait, while somebody will add its
3) make bounty request (and goto point 2).