Sign inSign up

mlamp/qbit-cleanup

By mlamp

Updated over 1 year ago

A Rust CLI tool that cleans up qBittorrent torrents

Image
0

1.3K

mlamp/qbit-cleanup repository overview

Qbit-Cleanup

A lightweight Docker image that cleans up your qBittorrent torrents by age and ratio projections.
Built using qbit-rs and Rust, it interacts with qBittorrent’s Web API to remove stale or low-ratio torrents.


Features

  • Age threshold: Only removes torrents older than a specified number of days.
  • Predicted ratio: Projects your torrent’s ratio over one year and removes it if the predicted ratio is below a given threshold.
  • Dry-run mode: See which torrents would be removed without actually deleting them.
  • Configurable: Adjust all parameters (age, ratio, credentials, endpoint) via CLI arguments.

Usage

  1. Pull the image:

    docker pull mlamp/qbit-cleanup:latest
    
  2. Run the container:

    docker run --rm \
      mlamp/qbit-cleanup:latest \
      --endpoint http://127.0.0.1:8080 \
      --username admin \
      --password adminadmin \
      --age 100 \
      --ratio 10
    
    • --endpoint: Your qBittorrent WebUI URL.
    • --username / --password: qBittorrent credentials (defaults: admin / adminadmin).
    • --age: Only clean up torrents older than <age> days.
    • --ratio: If the torrent’s predicted ratio after one year is below this, remove it.
    • --dry-run: Log which torrents would be deleted, but don’t actually remove them.
    • --debug: Show more detailed (debug-level) logs.

Examples

  • Default:

    docker run --rm mlamp/qbit-cleanup
    

    Uses default endpoint (http://127.0.0.1:8080), username (admin), password (adminadmin), age (100), ratio (10).

  • Dry run mode:

    docker run --rm mlamp/qbit-cleanup --dry-run
    

    Shows which torrents would be removed without actually deleting them.

  • Custom config (30 days, ratio < 5):

    docker run --rm mlamp/qbit-cleanup \
      --age 30 --ratio 5 --endpoint http://192.168.1.100:8080
    

License

This Docker image is distributed under the MIT License.

Contributing

Contributions are welcome! Feel free to open an issue or pull request in the GitHub repository.


Happy torrent-cleaning!

Tag summary

Content type

Image

Digest

sha256:e1da3d656

Size

31.7 MB

Last updated

over 1 year ago

docker pull mlamp/qbit-cleanup