From the README:

Pausing popular torrents isn't something that qBittorrent handles well. This library uses 2 criteria to pause / stop torrents.

They are stopped if they are:

  • Popular (IE have a lot of total seeds), and
  • You've given back more than what you've taken (IE a seed ratio > 1)

Requirements

  • Rust
  • A qBittorrent server.
  • An API key generated through the web UI.
  • A crontab where this script can be periodically run.

Usage

This will pause torrents with a ratio >= 2, and more than 10 total seeds.

cargo run -- \
--api-key API_KEY \
--endpoint ENDPOINT \
--ratio 2 \
--total-seeds 10

no comments (yet)

sorted by: hot top controversial new old
there doesn't seem to be anything here
3 comments in c/rust@programming.dev view that post
[–] 9 points 1 month ago*

If a torrent is right on the threshold, would pausing make the seeds drop and cause it to reengage next time, making it oscillate?
And same for multiple seeds using it, they could start to each drop out and rejoin all at once if they have similar cron frequencies. Especially since trackers have some delay.

I also wouldn't un- and repause paused torrents every cycle. So having a 3rd condition function that filters for being under a somewhat lower seed count (hysteresis) where it unpauses would solve both.

I'd expect qbit to have some overhead for resuming, and also to dos the trackers a little, if there are oscillations or paused torrents are momentarily resumed every run.

Edit: should prob ping @dessalines@lemmy.ml since this is a crosspost.

  • source
  • [–] 5 points 1 month ago

    interesting, 10 has been my threshold for keeping on seeding for years

  • source
  • [–] 1 point 1 month ago*

    I just seed everything. Most of the time nothing is actually transferring. Dunno if @dessalines@lemmy.ml actually has an upload problem and is using too much bandwidth. What actually made you write this?

    P.S and why not on codeberg or Radicle?

  • source
  • 2 comments in c/rust@lemmy.ml view that post
    [–] 3 points 1 month ago* (last edited 1 month ago) (1 child)

    Sounds like a nice thing. Although I think I'll continue doing that manually. I have a habit of evaluating the content that I've got from torrents. I do it in my mind explicitly. And then I share longer proportionally to how good the thing was, and how rare I estimate it is. This is decided once and doesn't change after, with a built-in "share ratio" limit. Once a torrent reaches its ratio and becomes Paused, I know that it's done and can be removed.

    In the beginning, all torrents stop as soon as they finished downloading, to let me evaluate the content. (Uninteresting stuff I intentionally don't share back at all.)

  • source
  • hideshow 1 child comment
  • [–] [S] 2 points 1 month ago

    For sure. I've done it manually for years up until now, when I realized they make really easy to use libraries for rust.

    I've done the share ratio only filter like you, but I realized that some torrents are heavily leeched, yet stay unpopular. IE my share ratio was > 100, yet I was still the only seeder. So this library makes sure that they're also popular before pausing them.

  • source
  • parent