Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Category not working #51

Closed
sybenx opened this issue Nov 28, 2022 · 2 comments
Closed

Change Category not working #51

sybenx opened this issue Nov 28, 2022 · 2 comments

Comments

@sybenx
Copy link

sybenx commented Nov 28, 2022

Change category leaves category blank no matter which category is selected

qBittorrent ver 4.5.0
running native on
Windows 10

@SpasovskiFilip
Copy link

SpasovskiFilip commented Dec 25, 2022

Same here, after I updated qBittorrent to 4.5.0 it stopped, before it worked great.

UPDATE

After some digging, I found out that qBittorrent changed the way they set the categories from the webUI.
It no longer sends a GET request, but rather a POST request. Also the hash and category are not a part of the URL, they're now part of the body attribute of the request.
Here is an example of how the qBittorrent native WebUI fetch request looks like

fetch("http://192.168.1.111:8081/api/v2/torrents/setCategory?hashes=f05005827111faa0ef05fc453785b3c842816883&category=Category1", {
    "headers": {
        "accept": "application/json, text/plain, */*",
        "accept-language": "en-GB,en-US;q=0.9,en;q=0.8"
    },
    "referrer": "http://192.168.1.111:8081/",
    "referrerPolicy": "strict-origin-when-cross-origin",
    "body": null,
    "method": "GET",
    "mode": "cors",
    "credentials": "include"
});

And this is how iQbit's fetch request looks like

fetch("http://192.168.1.111:8081/api/v2/torrents/setCategory", {
    "headers": {
        "accept": "text/javascript, text/html, application/xml, text/xml, */*",
        "accept-language": "en-GB,en-US;q=0.9,en;q=0.8",
        "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
        "x-requested-with": "XMLHttpRequest"
    },
    "referrer": "http://192.168.1.111:8081/",
    "referrerPolicy": "same-origin",
    "body": "hashes=f05005827111faa0ef05fc453785b3c842816883&category=Category1",
    "method": "POST",
    "mode": "cors",
    "credentials": "include"
});

@ntoporcov
Copy link
Owner

Fixed a whole bunch of the methods on the latest push, it should all be working now with 4.5.0
Please create a new issue if I missed any of the endpoints and I'll try to get it fixed same day :D

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

No branches or pull requests

3 participants