[Plugin] dlimit v0.1

Suggest, post, or discuss plugins for Deluge
Post Reply
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

[Plugin] dlimit v0.1

Post by mhertz »

This plugin hooks into torrent-added/finished/removed and session-started, and counts number of active downloads, divides this number by your defined limit, and restricts each of these with that value for max-download-speed. If only one torrent added/left, then keeps/resets the limit to -1.

I initially added a loop, and extra setting for interval of it, but rethought it to be more effecient with just hooking into previously mentioned events.

GTK-UI, web-UI and config-file support for defining limit, used for limiting divided across active downloads.

Thanks to ambipro for original idea and being a class act :)

Code in plugin as usual, just unzip.

dlimit-0.1.egg

Edit: Link down apparently, so here's alternative: https://1drv.ms/u/s!Ajl1yq0BfB-dgt0KBBo ... w?e=qNhPlk
User avatar
ambipro
Moderator
Moderator
Posts: 418
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: [Plugin] dlimit v0.1

Post by ambipro »

Glad to see it came to fruition!
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] dlimit v0.1

Post by mhertz »

Thanks bro, appreciate you :)
basher
Leecher
Leecher
Posts: 91
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia/Spain

Re: [Plugin] dlimit v0.1

Post by basher »

Not quite following - how's this different than limiting speeds via built-in per-torrent or global settings in deluge?
Also, @mhertz, you know what I'm going to say -- where's the github project? :)
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] dlimit v0.1

Post by mhertz »

Hi basher! :)

Well, it's different in that it happens automatically, for people wanting all there torrents loaded have same download speed, and so continually auto-regulates this limit up/down/removed as per the current state of things i.e. loaded amount of currently active downloads(so if defining 100MiB as limit(i.e. max download capacity approx), then one torrent loaded gets, well keeps, -1, a second added and both gets 50 limited, a second added and all 3 gets 33,33 limited, and when one finishes the remaining two gets 50 and when one more finishes so only one left, then that left one gets -1 etc etc)

I got the idea by ambipro as said, and I also had read it several times online where people requested this i.e. why one torrent took most bandwith and the others not so much, despite enough peers for them all. Personally I don't use this, and see issues e.g. if using public trackers, where swarm not pretty much guarrentied(hence possibility of wasting bandwith), and even on private popular trackers still is issue of your download-capacity get congested and go up/down etc, and so this plugin, like all of the others I made, are just simply for helping a few people, sometimes even just one possibly, + at same time upping my meager skills to become slightly better at such stuff, in time, hopefully at least.

Good one! :) As said, i'm little strange, peculliar atleast, so not there, and also was gonna check if you had added AddTorrentCheck yourself, or forked, to your repo's, and then delete mine. It sounds like i'm making a big deal out of this, which honestly isn't, and not like it will ruin my sleep dwelling over it, if was there lol, but just since I don't really prefer it, then decided not too, simply. Hope understand. That said, please say the word if ever seeing something you might be interrested in, or whatever, and i'll gladly make a, damn now I forgot what the freakin' word called, exception, that's it! :) Honestly, I have a hard time even explaining this as makes pretty much zero sense lol, so I might force myself to change this stupid, I don't know what to call it, OCD kinda thing maybe, and keep every single thing on there, like regular people, but just for right now, it's still status quo...
basher
Leecher
Leecher
Posts: 91
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia/Spain

Re: [Plugin] dlimit v0.1

Post by basher »

No sweat, just had to make that comment :D
mhertz wrote: Mon Mar 13, 2023 11:54 am also was gonna check if you had added AddTorrentCheck yourself, or forked, to your repo's
Nope, but can do. Where can I fork it from?
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] dlimit v0.1

Post by mhertz »

Thanks bro, appreciated! :)

Sorry here I just setup again: https://github.com/mhertz/deluge-AddTorrentCheck

No commit logs for initial changes i'm affraid in this new one.

However, I had actually checked your repo's yesterday, and then I noticed buroa had forked mine and added some stuff, so deleted mine, and so my earlier commits listed in his, plus newer code, so probably best to fork from him, and can revert his last commit if needed. I must confess I didn't understood the modulo logic part very good or whatever called(why check for if was a clean divide of 30 secs gone by I mean) and don't like the blocking time.sleep(), and don't understand why pause/resume instead of just force-resume - ohh while writing I get it(modulo), obviously for only doing such every 30 secs, doh, pause/resume I mean, sorry buroa for being an idiot lol.

Edit: Forgot link sorry: https://github.com/buroa/deluge-AddTorrentCheck

Edit2: Deleted my deluge-AddTorrentCheck repo again, as not needed.
basher
Leecher
Leecher
Posts: 91
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia/Spain

Re: [Plugin] dlimit v0.1

Post by basher »

Cool, will fork from @buroa.

Not going to create repo for dlimit plugin though, as I feel like it's an extremely niche one.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] dlimit v0.1

Post by mhertz »

Thanks bro, and understand :)
Post Reply