Registered Member
|
Can you add some sort of option for randomizing seeds?
I would like something that would go through my list of torrents and randomly select some to seed with a configurable time when it will re-randomize. It will keep adding seeds until my bandwidth is fully utilized. If a seed drops off bandwidth, it would pick another torrent to seed. Also, can you add some sort of option for prioritizing seeds? I would like the poorly seeded torrents to have priority over heavily seeded torrents. |
Registered Member
|
I have yet to find a torrent client that provides a configurable seeding-priority scheme that satisfies my needs.
I think the best way to build one would be to give the user a set of configuration options including *if/then/else* structures and *and/or* comparisons. If the ktorrent queue manager could be configured to this level of depth, it would put Vuze to shame. But please don't integrate such an idea into the scripting plugin, as it doesn't seem to work on Gnome. |
Moderator
|
It should work on any desktop environment |
Registered Member
|
I found the main problem with kross is that many distros don't actually ship it and of those that do some don't ship the kross-python binding (or kross-anything) The reason i say this is that I have been thinking about implementing this as a script, but i've been distracted by other stuff (e.g my grouping script). , it seams like this is defiantly suited to a calling a simple script, however to start with i was thinking of something easy like DO NOT RUN AS SLEEPING CAUSES KTORRENT TO SLEEP
I have to go do stuff, but this code is hopefully a start, the sleep function needs to be replaced with either threading OR KTScriptingPlugin.createTimer(True) hope this helps somebody finish this off p.s please post if there is an easy way to implement a sleep equivalent for just one one script, otherwise the script will need to be totally redesigned ( first call scrape for all needed torrents> "sleep for a ?60s?> stop/start torrents > "sleep for timeout" > back to start), it probably isn't too hard, but thought ill leave this code here incase its useful
Last edited by Rioting_Pacifist on Fri Aug 21, 2009 3:16 pm, edited 1 time in total.
|
Moderator
|
I haven't tried threading in kross scripts, should work but the big problem is when you start calling ktorrent functions, most of them are not thread safe.
The easiest way to sleep is using createTimer, it integrates well with the Qt event loop, and doesn't result in all the dangers associated with threading. |
Registered Member
|
Well I've installed every kdelibs* package in the Ubuntu repository, and I still can't even get this to work:
http://ktorrent.org/wiki/index.php/Writing_Scripts Edit: By the way, I'm using the Ubuntu package for ktorrent 3.2.1, along with all other KDE dependencies coming from Ubuntu packages. |
Registered Member
|
AFAIK kdelibs only refers to the kde version of the code, distros then cut it up and repackage it so there is no guarantee the just because you have all of "kdelibs" installed that you have the js plugin (if i was packaging kde id put it under kross-js), what does
return. My scripts should work, there are 2 versions 0.2 has a static delay after scraping trackers 0.3 is less tested but waits 5s for the reply to each scrape. They don't do exactly what you asked for as you need to define the targetUpload, tbh if you just want to saturate your bandwidth do you want to just leave them all running and rotate the priorities (if that's what you want i can probably change the script to do that (hell its probably a lot easier than this). The scripts are just the plain python scripts (listed below due to forum choice) so will need to be installed manually, they will also need to configured by hand. BUGS: Only works if torrents are running (see below) Will add all torrents if your target is higher than your upload cap Does not free-up ram on exit Exit code causes raises an error (tbh im not sure how to exit the loop correctly) TODO: Move all torrents into a group (expect that today/tomorow) Add gui configuration (will take me a while, but i'll accept somebody elses help on this ) Figure out how a better way to get the targetUpload than a static definition The bug I think my script should work, unfortunately started torrents don't seam to start (but do up in the the the tab numbers) unless you already have a torrent running, the relevant code is
p.s can somebody recommend good defaults the delays i'm not tormenting much atm (brother is using xbox live all day) so haven't had time to tweak them self.seedAddedWait (currently 30s) self.trackerWait (currently 60s or 5s per torrent) It turns out the forum doesn't like attachments here are the scripts:
edit: spelt reviver correctly And additional snippet to add the groups to the groups menu when bug203922 is fixed, replaces lines 97 onwards
Last edited by Rioting_Pacifist on Sat Aug 22, 2009 5:39 pm, edited 2 times in total.
|
Registered Member
|
I already have the ruby and python plugins, which are all that I see.
|
Registered Member
|
I don't know much about kross, other than it was designed to do stuff like this, instead of having a million features, having a million optional scripts, but there is no reason it shouldn't work in gnome, i suspect it is a bug in either the version of ktorrent/kde you have or you packaging (do your logs give any hints as to why errors? btw this should probably be in a different thread, and your likely to get better help on a ubuntuorums (or maybe kde forums), as there is no reason gnome/kde apps can't work together fully, other than packaging.
|
Registered users: Bing [Bot], Evergrowing, Google [Bot]