This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Copy completed files instead of moving

Tags: None
(comma "," separated)
bamboo_slide
Registered Member
Posts
2
Karma
0
Hello all,

KTorrent allows to "Move completed Files" to another location. But is there a way to _copy_ files ?

Want i would like to do :

Download on my internal disk.
When download is completed to 100%, copy it to my network disk.
Keep torrent on the internal disk until share ratio is reached.
When share ratio is reached, stop torrent.

What I can do actually

Download on my internal disk.
When share ratio is reached, move it to my network disk, stop torrent.

But I have to wait a long time before share ration is OK, and my media center is only linked tio the network disk.

OR

Download on my internal disk.
Copy files manually when torrent reaches 100%

But I don't like the "manually" :D

Is there a way to do that ?

Thanks a lot.
netcelli
Registered Member
Posts
44
Karma
0
OS
Hello, Ktorrent comes with script support.

You can use finished signal that is emmitted when a torrent is completed. So you can copy torrent files to your HD.
For ex:
Code: Select all
!/usr/bin/env kross
import KTorrent
import KTScriptingPlugin
import Kross

finished(info_hash)
   tor = KTorrent.torrent(info_hash)
#Copy your file on HD by using tor.filePathOnDisk(file_index) to locate torrent files


Above is just an example :) You can find more info here http://ktorrent.org/wiki/index.php/Writing_Scripts and here http://ktorrent.org/wiki/index.php/API_Reference.
For stopping a torrent when share ratio is reached you can add to your script a timer that check running torrent and stop them is ratio is OK ;)
bamboo_slide
Registered Member
Posts
2
Karma
0
Yes, I saw the scripting part on ktorrent, and that was what i wanted to do.

"Finished" means "100% Downloaded" right ?

I think the other event is "seedingAutoStopped" ? when ratio is reached ?

I'll give it a try.

Thanks.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]