feat: add API token authentication support for qBittorrent v5.2.0+#212
Open
hongcankun wants to merge 1 commit into
Open
feat: add API token authentication support for qBittorrent v5.2.0+#212hongcankun wants to merge 1 commit into
hongcankun wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for API token authentication in qBittorrent v5.2.0+ (WebAPI v2.14.1+), allowing users to authenticate using an API token instead of username/password.
Motivation
qBittorrent v5.2.0 introduced API token authentication as a more secure alternative to traditional username/password authentication. This change allows autoremove-torrents to use API tokens for authentication with compatible qBittorrent versions.
Changes
Modified Files
autoremovetorrents/client/deluge.py: Updatedloginmethod to accept optionalapi_tokenparameterautoremovetorrents/client/qbittorrent.py:loginmethod in both API v1 and API v2 handlers to accept optionalapi_tokenparameterautoremovetorrents/client/transmission.py: Updatedloginmethod to accept optionalapi_tokenparameterautoremovetorrents/client/utorrent.py: Updatedloginmethod to accept optionalapi_tokenparameterautoremovetorrents/task.py:api_tokenin configuration (including environment variable replacement)api_tokento client login methoddocs/config.rst: Updated documentation to includeapi_tokenconfiguration optionUsage Example
Features
api_token(e.g.,api_token: $(QBITTORRENT_API_TOKEN))Testing
Tested with qBittorrent v5.2.0+ using API token authentication and verified backward compatibility with username/password authentication.
Checklist