Skip to content

Commit b23a4cb

Browse files
committed
ci: Test multiple qBittorrent versions on each run
1 parent 12d2525 commit b23a4cb

File tree

3 files changed

+38
-20
lines changed

3 files changed

+38
-20
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ env:
2121
jobs:
2222
build_and_test:
2323
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
version:
27+
- qbt: 5.1.2
28+
libtorrent: 2.0.11
29+
- qbt: 5.0.5
30+
libtorrent: 2.0.11
31+
# Broken because of field renaming in API since v5.0
32+
#- qbt: 4.6.7
33+
# libtorrent: 2.0.10
2434
steps:
2535
- uses: actions/checkout@v4
2636
- uses: dtolnay/rust-toolchain@nightly
@@ -33,18 +43,18 @@ jobs:
3343
uses: actions/cache/restore@v4
3444
with:
3545
path: qbittorrent-nox
36-
key: ${{ runner.os }}-qbittorrent-nox-github
46+
key: ${{ runner.os }}-qbittorrent-nox-github-${{ matrix.version.qbt }}-${{ matrix.version.libtorrent }}
3747
- if: ${{ steps.qbittorrent-nox.outputs.cache-hit != 'true' }}
38-
name: Download qbittorrent-nox
39-
run: wget -O qbittorrent-nox https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-5.0.4_v2.0.11/x86_64-qbittorrent-nox
48+
name: Download qbittorrent-nox ${{ matrix.version.qbt }}
49+
run: wget -O qbittorrent-nox https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-${{ matrix.version.qbt }}_v${{ matrix.version.libtorrent }}/x86_64-qbittorrent-nox
4050
- run: chmod +x qbittorrent-nox
4151
- run: sudo ln -s $(pwd)/qbittorrent-nox /usr/local/bin/qbittorrent-nox
4252
- if: ${{ steps.qbittorrent-nox.outputs.cache-hit != 'true' }}
4353
name: Save qbittorrent-nox
4454
uses: actions/cache/save@v4
4555
with:
4656
path: qbittorrent-nox
47-
key: ${{ steps.qbittorrent-nox.outputs.cache-primary-key }}
57+
key: ${{ runner.os }}-qbittorrent-nox-github-${{ matrix.version.qbt }}-${{ matrix.version.libtorrent }}
4858
- run: mkdir -p /tmp/qbittorrent-nox
4959
- run: ./scripts/qbittorrent.sh start /tmp/qbittorrent-nox 8080
5060
- run: ./scripts/pre-commit.sh

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,28 @@ for torrent in client.list().await? {
2626
```
2727
## Supported backends
2828

29-
- [x] QBittorrent
29+
- [x] QBittorrent (v5.0.x, v5.1.x)
3030
- [ ] Transmission
3131

32-
### QBittorrent notes
32+
### qBittorrent notes
3333

34-
Only QBittorrent release v5.0.4 (18 February 2025) is tested in the CI at the moment.
34+
Only the following qBittorrent releases are supported and tested in CI:
3535

36-
The QBittorrent API exists, but is fragile... As a result, only the latest versions of QBittorrent are supported for the moment.
36+
- v5.1.2 (2 July 2025)
37+
- v5.0.5 (13 Aprli 2025)
3738

38-
- sometimes returns JSON, sometimes plaintext
39-
- may return HTTP 200 "Fails", or 400 "Bad Request"
39+
qBittorrent v4.6.x is known not to work properly due to the ever changing API. Checking support in newer releases only requires changing the [CI configuration](.github/workflows/ci.yml) (pull requests welcome). We will not add support for older qBittorrent releases (Debian 13 Trixies packages qBittorrent v5.1.x), but contributions for this are welcome. Bittorrent v2 is only supported since v4.4.0 (6 January 2022) so it's unlikely we'll ever support an older release.
40+
41+
The qBittorrent API is surprising (to say the least):
42+
43+
- some responses are JSON, some are plaintext
44+
- an error may be HTTP 200 with plaintext "Fails", or HTTP 400 "Bad Request"
45+
- client requests [may not be chunked](https://github.com/qbittorrent/qBittorrent/issues/17353), despite being the default when uploading files in many HTTP clients
4046
- does not return the same information in list/get endpoints (issue [#18188](https://github.com/qbittorrent/qBittorrent/issues/18188))
4147
- behaves unexpectedly with v2/hybrid hashes (issue [#18185](https://github.com/qbittorrent/qBittorrent/issues/18185))
4248
- [sometimes changes methods](https://github.com/qbittorrent/qBittorrent/issues/18097#issuecomment-1336194151) on endpoints without bumping the API version to a new major (semantic versioning)
4349
- may change form field names in API [without updating the docs](https://github.com/qbittorrent/qBittorrent/pull/20532) ([upstream docs PR](https://github.com/qbittorrent/wiki/pull/29))
4450

45-
Bittorrent v2 is only supported since v4.4.0 release (January 6th 2022).
46-
4751
## Supported features
4852

4953
- [x] List torrents

src/lib.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,28 @@
2525
//! ```
2626
//! # Supported backends
2727
//!
28-
//! - [x] QBittorrent
28+
//! - [x] QBittorrent (v5.0.x, v5.1.x)
2929
//! - [ ] Transmission
3030
//!
31-
//! ## QBittorrent notes
31+
//! ## qBittorrent notes
3232
//!
33-
//! Only QBittorrent release v5.0.4 (18 February 2025) is tested in the CI at the moment.
33+
//! Only the following qBittorrent releases are supported and tested in CI:
3434
//!
35-
//! The QBittorrent API exists, but is fragile... As a result, only the latest versions of QBittorrent are supported for the moment.
35+
//! - v5.1.2 (2 July 2025)
36+
//! - v5.0.5 (13 Aprli 2025)
3637
//!
37-
//! - sometimes returns JSON, sometimes plaintext
38-
//! - may return HTTP 200 "Fails", or 400 "Bad Request"
38+
//! qBittorrent v4.6.x is known not to work properly due to the ever changing API. Checking support in newer releases only requires changing the [CI configuration](.github/workflows/ci.yml) (pull requests welcome). We will not add support for older qBittorrent releases (Debian 13 Trixies packages qBittorrent v5.1.x), but contributions for this are welcome. Bittorrent v2 is only supported since v4.4.0 (6 January 2022) so it's unlikely we'll ever support an older release.
39+
//!
40+
//! The qBittorrent API is surprising (to say the least):
41+
//!
42+
//! - some responses are JSON, some are plaintext
43+
//! - an error may be HTTP 200 with plaintext "Fails", or HTTP 400 "Bad Request"
44+
//! - client requests [may not be chunked](https://github.com/qbittorrent/qBittorrent/issues/17353), despite being the default when uploading files in many HTTP clients
3945
//! - does not return the same information in list/get endpoints (issue [#18188](https://github.com/qbittorrent/qBittorrent/issues/18188))
4046
//! - behaves unexpectedly with v2/hybrid hashes (issue [#18185](https://github.com/qbittorrent/qBittorrent/issues/18185))
4147
//! - [sometimes changes methods](https://github.com/qbittorrent/qBittorrent/issues/18097#issuecomment-1336194151) on endpoints without bumping the API version to a new major (semantic versioning)
4248
//! - may change form field names in API [without updating the docs](https://github.com/qbittorrent/qBittorrent/pull/20532) ([upstream docs PR](https://github.com/qbittorrent/wiki/pull/29))
4349
//!
44-
//! Bittorrent v2 is only supported since v4.4.0 release (January 6th 2022).
45-
//!
4650
//! # Supported features
4751
//!
4852
//! - [x] List torrents

0 commit comments

Comments
 (0)