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
  • redjard@reddthat.com
    link
    fedilink
    arrow-up
    9
    ·
    9 days 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.

  • onlinepersona@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    7 days 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?