Skip to content

fix(qbit): respect hashes when changing torrent categories - #418

Open
luigibarretta wants to merge 1 commit into
sirrobot01:mainfrom
luigibarretta:fix/scoped-category-updates
Open

luigibarretta wants to merge 1 commit into
sirrobot01:mainfrom
luigibarretta:fix/scoped-category-updates

Conversation

@luigibarretta

Copy link
Copy Markdown

The qBittorrent setCategory handler builds a hash set but never assigns filterFunc. UpdateWhere therefore receives nil and changes every queued entry, including torrents not selected by the client.

This patch supplies an explicit hash predicate, supports pipe-delimited and repeated hashes, matches hashes case-insensitively, and requires an explicit all value for whole-queue changes. Missing or ambiguous hashes return HTTP 400.

Regression tests cover one/multiple/unknown hashes, explicit all, missing input, ambiguous input, and preservation of unselected storage rows and their paths. Verified with go test -p 2 ./pkg/server/qbit against current main 0dd1cbb.

No changes to delete, pause/resume, data format or dependencies. The same fix has been exercised in a private deployment with per-row queue verification. AI-assisted contribution, reviewed and tested before submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant