Writing an efficiency-booster script for Beginner

Windows specific questions, problems.
Post Reply
Azzarok

Writing an efficiency-booster script for Beginner

Post by Azzarok »

Hi mates,

First post here and first experience with scripting.
I was wondering if anyone here can help me with a little project for my torrent management.
Let me explain.

I have many many (too many) torrents in qBittorent, and really want them to finish so I can move to another task, as my ADHD keeps my focus on this until it's finish. And some torrents are stalled for month, or more.I would like to let qBittorent work when I'm not on my PC but in an efficient way.The problem is, many of my torrents lacks of seed, or have bad seeds and so a very slow DL speed.When I'm on my PC I can let it work a minute, see which torrents are slow and pause them but when I'm not here, I can't.I first tried some tutorials to improve the efficiency, by putting the right settings in Maximum Active DL, Maximum Active Torrents, and so on based on my DL rate on my router.It's already really cool, when torrents are well seeded, I have 5 Maximum Active DL and it's worth it.

But for my slow torrents issue, I tried the option in Settings > Bittorent > "Do not count slow torrents in these limits"I don't know if y'all familiar with this.You can input a DL speed and UL speed Threshold, and a Inactivity time, and the software, will not count the Torrents which are below these limits for the amount of Inactivity Time you put.So in my case, I have 5 Maximum Active DL, and 7 Maximum Active Torrents (DL & UL), so if a torrent is below my limits, it doesn't count and go for another torrent.It helps me to skip a bit some slow torrents but I had a problem then.qBittorent seems to calculate the next torrent when it skips a slow one based on Active Torrents, not all torrents. So for 7 Max Active Torrents, when I already have my 5 Max Torrents DL, if I have 2 completed Torrents uploading, they're active, UL but active and my 7 Max Torrents are filled. So qBittorent will not skip the slow torrents. It's like it's doesn't see the rest, unless one DL in finished or one UL stops.

For this I tried to up my number of Maximum Active Torrents only. It leads me to succesfully have many many active torrents, not downloading but ready to be the next when a slow torrent isn't counted. And here I have a big problem. Too many slow torrents leads me to have 49636459 not counted torrents, which are still downloading, but really slowly.It's taking up my bandwith and so isn't really optimal.

The last option I saw was to write a script that do what I usually manually do, which works a lot better.

And keeps my 7 Maximum Active Torrents to save my bandwith.

I would like the script to do something like that:

- Looking closely to the 5 actual DL (the max)

- If there is one torrent below my limits (that I can setup in the script), do not "not count the torrent" but pause it. I prefer.

- And do this check for every next torrent

- When all the DL are done, and many torrents are on pause because of their slow DL speed, loop the check again, by resuming all the paused torrents.

(Because I've thought about the obvious reasons that can lead a torrent to be slow, and it can also be a temporary router issue, a temporary seed issue or whatever. Sometimes torrents are slow and boom, hours later it isn't anymore.)

And I would like the script to do that like infinitly to constantly check if a torrent -previously slow- is not good now.

Is this kind of script even possible ?
And, is this possible right on qBittorent ? I thought that because of the flexibility of the software but not sure.
If not, maybe is it possible with an external software or external script, like how we do with macro programming etc ?

Thanks a lot, like infinite thanks if you read this last line, and a hundred thanks if you can help me. Sorry for the amount of text but I wanted to be sure that I'm understandable because I'm mostly lost in this domain. And also sorry for my english, not my primary langage.

Have the best day mates !
Azzarok.
unseen19
Veteran
Veteran
Posts: 189
Joined: Mon Mar 15, 2021 1:36 pm

Re: Writing an efficiency-booster script for Beginner

Post by unseen19 »

Hi,

at the end it may even be easier to have two QBT instances (docker should do it) or two different client, or different computer. Just a suggestion of course as I'm not sure the script will be done nearly soon.
Azzarok

Re: Writing an efficiency-booster script for Beginner

Post by Azzarok »

Thanks @unseen19 for the reply !
I will try something like this !
Post Reply