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

Resume torrents failing after completed race #43

Closed
relik7 opened this issue Nov 21, 2023 · 3 comments · Fixed by #44
Closed

Resume torrents failing after completed race #43

relik7 opened this issue Nov 21, 2023 · 3 comments · Fixed by #44

Comments

@relik7
Copy link

relik7 commented Nov 21, 2023

When running qbit-race with the completed option, it isn't resuming torrents in qBittorrent 4.6.0 with an error in the log file:

2023-11-20T22:22:28.161Z [ERR]: Failed to resume torrents! Error: Failed to resume torrents. Error: AxiosError: Request failed with status code 405

I looked this up and it looks like 405 is usually returned when using a GET method when POST is wanted.

The problem seems to lie here :

try {
await this.client.get(ApiEndpoints.resumeTorrents, {
params: {

I see that other things like pausing the torrents, adding tags, etc are all using POST and they are working. Is there any reason why this was coded with GET? If so, would a fallback to POST on failure fix my problem?

@ckcr4lyf
Copy link
Owner

Related to #39 I think. Initially the API worked with both GET and POST, though as per spec it should be POST

Over time they started to enforce this. Let me fix it for this endpoint, and update the release.

@relik7
Copy link
Author

relik7 commented Nov 21, 2023

Awesome, thanks for the quick response! I did just test it by copying and pasting the pause torrent snippet, changing it to resume and it worked. So it's good for me at the moment if you want to take your time to update the release.

@ckcr4lyf
Copy link
Owner

@durgins I've released the fixed version.

You can update it by running:

npm update -g qbit-race

I am not entirely sure how this affects manual patches, but I guess it will just overwrite it.

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 a pull request may close this issue.

2 participants