Jump to content

Move files when seeding is finished.


minesadab

Recommended Posts

  • 3 weeks later...
  • Replies 114
  • Created
  • Last Reply
  • 2 months later...

I have almost the same situation as iBurgerrr does. I have a RAID array which spins down when not in use. So downloads go to non-RAID drive and when finished, they are moved to the array. But array will not spin down unless seeding is stopped. Requested feature would solve the problem.

Link to comment
Share on other sites

  • 2 months later...
I have discovered one VERY roundabout way of accomplishing what I'm looking for until they actually update uTorrent to include this behaviour.

Using ActiveState Perl (I told you it was roundabout), and using the WebUI, I have the following script which I run daily:

use Net::uTorrent;

my $utorrent = Net::uTorrent->new (

hostname => 'localhost',

port => '8085',

user => 'admin',

pass => 'XXXXXXXX',

);

die unless $utorrent->login_success;

my $torrents_aref = $utorrent->torrents;

print "Total Number = @torrents_aref\n";

foreach (@$torrents_aref) {

%torrent_href = %$_;

if (($torrent_href{percent} == 1000) and ($torrent_href{status} == 136)) {

print "$torrent_href{name} ready for delete\n";

$utorrent->remove_data( $torrent_href{infohash} );

}

}

All it's doing is querying uTorrent for all torrents which are at 100% (it says 1000 because the api returns the value shifted one decimal, so 99.9% == 999). If the torrent is at 100%, then it checks for ths status... status of 136 == finshed seeding. It then pulls a remove_data, which is the equivilent of a "remove torrent and data".

Like I said, it's really not the best way to do it, but it gets the job done for the time being until they get the feature completed.

I just wanted to say thanks for this. I haven't implemented it yet but it looks to fit exactly what I need. I use an old laptop that serves no other purpose than to run uTorrent. Once it completes I have it virus scan and then copy the torrent to a RAID on my linux server shared via samba. I already use webui and my linux box of course has perl so this is an easy implementation for me!

Link to comment
Share on other sites

I have discovered one VERY roundabout way of accomplishing what I'm looking for until they actually update uTorrent to include this behaviour.

Using ActiveState Perl (I told you it was roundabout)' date=' and using the WebUI, I have the following script which I run daily:

use Net::uTorrent;

my $utorrent = Net::uTorrent->new (

hostname => 'localhost',

port => '8085',

user => 'admin',

pass => 'XXXXXXXX',

);

die unless $utorrent->login_success;

my $torrents_aref = $utorrent->torrents;

print "Total Number = @torrents_aref\n";

foreach (@$torrents_aref) {

%torrent_href = %$_;

if (($torrent_href{percent} == 1000) and ($torrent_href{status} == 136)) {

print "$torrent_href{name} ready for delete\n";

$utorrent->remove_data( $torrent_href{infohash} );

}

}

All it's doing is querying uTorrent for all torrents which are at 100% (it says 1000 because the api returns the value shifted one decimal, so 99.9% == 999). If the torrent is at 100%, then it checks for ths status... status of 136 == finshed seeding. It then pulls a remove_data, which is the equivilent of a "remove torrent and data".

Like I said, it's really not the best way to do it, but it gets the job done for the time being until they get the feature completed.[/quote']

I just wanted to say thanks for this. I haven't implemented it yet but it looks to fit exactly what I need. I use an old laptop that serves no other purpose than to run uTorrent. Once it completes I have it virus scan and then copy the torrent to a RAID on my linux server shared via samba. I already use webui and my linux box of course has perl so this is an easy implementation for me!

Just so we're all on the same page - this has been implemented in the latest version. PM if you have any questions.

Thanks!

Link to comment
Share on other sites

  • 2 months later...

Just so we're all on the same page - this has been implemented in the latest version. PM if you have any questions.

Thanks!

Could you elaborate? I don't see anything like this in the "Directories" area of the settings. I'm using 2.2.1 build 25130

Link to comment
Share on other sites

  • 2 months later...

It's amazing that the original feature request was made back in 2005, is popular, and it hasn't been implemented despite what is said above by steppedup.

There are a few folk here who can't see the obvious benefit, but that shouldn't be a hindrance to getting a very simple feature included which, going by the number of +1 posts to this thread, would be appreciated by many people.

When a torrent has reached its target seed ratio/time and the data is no longer in use by uTorrent whatsoever, move it to another folder. This saves the user from having to manually identify data which are ready for archiving/deletion.

Any chance this will ever happen?

Link to comment
Share on other sites

  • 3 weeks later...

I've followed this topic for a while and found a very simple solution. I am still waiting for a directory selection inside the program itself for moving torrents that are finished seeding, but this works awesome for now. There's way more info here than probably needs to be, but someone might find it useful.

1. Go to Preferences

2. Click + next to Advanced at the bottom

3. Click Run Program

4. Paste in Run this program when a torrent changes state (quotes and all):

"C:\torrents\movetorrent.bat" %S "%N"

5. Click Apply and then OK buttons.

6. Make a .bat file, called a batch file. You can do this by right clicking in your torrent folder and selecting New Text Document. Rename it with a .bat extension. EX: movetorrent.bat

7. Right click movetorrent.bat and select Edit, it will bring up a notepad.

8. Paste in this notepad:

CD "C:\torrents\"
IF %1==11 (move %2 "C:\torrents\doneseeding\")

9. Save movetorrent.bat and you're done.

Things to note:

***Every time a torrent changes state, Added, Removed, Paused, Finished, etc... you will see a small dos window pop up. It's just checking to see if it should move the torrent or not.***

In:

"C:\torrents\movetorrent.bat" %S "%N"

'C:\torrents\' Is MY torrents folder, yours may differ, change accordingly.

Another Example:

"D:\whyisthishere\torr\movetorrent.bat" %S "N"

Also 'C:\torrents\doneseeding\' is a folder I use for well, torrents done seeding.

In our changed example, the '.bat' would become:

CD "D:\whyisthishere\torr\"
IF %1==11 (move %2 "D:\whyisthishere\torr\doneseeding\")

What's happening?:

The %S is a number indicating the state of the torrent.

The %N is the Title of the torrent. This will be the file name or folder name of the torrent. It needs to be in quotes when passed from uTorrent because it is a string variable.

uTorrent is passing the %S and "%N" to the '.bat' file as %1 and %2.

The %1(AKA %S) is checked to see what state it is in.

If and only if, %1 is 11 (11 is the code for 'Finished' state) then move %2 (AKA "%N" AKA the torrent) to the doneseeding folder.

Link to comment
Share on other sites

  • 4 weeks later...
I've followed this topic for a while and found a very simple solution. I am still waiting for a directory selection inside the program itself for moving torrents that are finished seeding, but this works awesome for now.

...

If and only if, %1 is 11 (11 is the code for 'Finished' state) then move %2 (AKA "%N" AKA the torrent) to the doneseeding folder.

This does NOT work consistently.

The problem is that the torrent will move into (and out of) the '11' state repeatedly until the seeding ratio (or time limit) has been met.

I am logging the state changes and a torrent will change to an 11 state each time a seeding state is finished. If the seeding ratio is not met, the torrent will then move to a '5' state (seeding) and then back to 11. This will continue until the ratio has been met.

So, I still have the same problem. How can I tell (via a script/program) when a torrent has completed seeding (ie. the ratio or time limit has been met) and the torrent will no longer be available for seeding?

I've automated most of the process of:

find torrent

download a torrent

copying it to a processing directory (ex: for XBMC)

Now I want to remove the torrent when it is no longer needed for seeding ('cause I've only got so much HD space).

The idea mentioned earlier in the thread of moving the torrent to another dir (when seeding is finished for good) would work.

Having a status that indicates that seeding is truly finished would work as well.

If anybody can direct me to how to accomplish this, I would be forever in your debt.

NOTE: My intention is to automate this, If I have to go to the UI and manually check to see if a torrent has finished seeding, it is not the answer I'm looking for.

Link to comment
Share on other sites

  • 6 months later...
this has been on the todo for like 6 months, just fyi. it'll get done eventually. Maybe not 1.8, but for sure 1.9. next time I see Ryan, might press him to get this one in for 1.8.

This quite an interesting thread since its one of the oldest and largest topics discussed on the feature request board, and still not dealt with. According to Firon, it has been on the todo-list since summer 2007 and was "for sure"to be implemented in 1.9.

Clearly there has been loads of people wanting this feature, me included and in the thread there has even been some quite good suggestions on how/where this option should be.

I'd like it to be in settings - queue as an option for seeding goal:

When seeding goal have been met:

[x] move to...[enter path]

[ ] delete torrent

[ ] delete torrent AND data

As much as I would like this option, I would like almost even more a reply from an administrator about why this has been left out for so long. The last time an administrator showed interest In the matter was three and a half years ago.

Link to comment
Share on other sites

Knowing when to move the file is my ONLY problem with the .torrent/uTorrent experience. Automatic file transfer when seeding obligations are met is a connivence most users would appreciate. I put finished mp3 files, finished porn, finished DVD files, etc., all in different folders, so the fix could get complicated. Instead tell me when the completed file has been in uTorrent long enough to be called "seeded". Then I'd know when it's OK to treat the file like any other media file on my machine. I've tried to find a thread telling me how and when to remove all the torrent and .torrent stuff that comes from using this new [to me] torrent technology. I appreciate the results, and want to seed everything I score, even beyond the minimum recommended time. Just give me a clue when that is for each download. Any visual aid would work [font color, arrow color, special icon]. The idea to make the program move (not copy) the completely seeded file automaticlly works if all the files go in the same directory. If the idea is to be worthy, the additional code should also include the deleting of all, now unneccessary data [.torrents, and all torrent related downloading exec files], but what the heck do I know, I'm a newbie here. In closing I'll ask where this "seed ratio" is, what does it look like, and what should it exceed? Easy enough, yes? I am long winded, forgive me. I try to cut back, but you know how that goes.

Peace,

peyotesmoke

Link to comment
Share on other sites

In closing I'll ask where this "seed ratio" is, what does it look like, and what should it exceed?

I understand that moving a file to a different location might get tricky if you would like to move them to different location depending on different torrents. It could be able to put the in subfolder depending on their label which is how they have solved the issue when the torrent has finished downloading.

The seed ratio for individual torrents is a tab you can bring up in the torrent-window if you right-click (Windows) the area that define what kind of info you see about the torrents. The "seed ratio" is a ratio about upload/download. This means, if you barely uploaded half the amout of data that you dowloaded, you get a ratio looking like 0.435 for example.

It's considered polite to at least upload the same amout that you have downloaded (therefore making your ratio 1.0) and some closed trackers can actually demand that you have an overall ratio of at least 1.1 on their site (meaning you've uploaded 1/10 more than the amount you downloaded from them).

Link to comment
Share on other sites

thanks thizizmyname, I got it now. Ain't this torrent thing great? I've got to get my downloading under control. If I don't find the handle, I'm gonna run outta storage. Currently, I'm thinking of adding a 2 or 3 TB external [or portable] hard drive. But that's not quite getting control of my downloading, is it? Stay sharp,

peyotesmoke

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...