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

Remove dependence on qBittorrent session cookie being named SID #139

Merged
merged 3 commits into from
Feb 8, 2023

Conversation

rmartin16
Copy link
Owner

@rmartin16 rmartin16 commented Jan 15, 2023

The name of the qBittorrent session cookie is now configurable via qbittorrent/qBittorrent#18384.

My initial go at this simply allowed the user to declare the name of the cookie being used. However, this can only be done when Client is initialized. Therefore, if the cookie name is changed or just a different qBittorrent host shows up, then the Client will need to be recreated altogether.

This client strives to always establish a successful connection for any API request as long as the username/password is correct. This may be possible if qBittorrent exposed the name of the cookie via an API method....but either way, this strategy just removes the dependence on knowing what the session cookie is at all.

@rmartin16 rmartin16 force-pushed the user-config-cookie-name branch from 89e7cf9 to 45402ae Compare January 15, 2023 20:24
@codecov
Copy link

codecov bot commented Jan 15, 2023

Codecov Report

Merging #139 (61b5b40) into main (2990ba9) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #139   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         1917      1924    +7     
  Branches       566       563    -3     
=========================================
+ Hits          1917      1924    +7     
Impacted Files Coverage Δ
qbittorrentapi/decorators.py 100.00% <ø> (ø)
qbittorrentapi/auth.py 100.00% <100.00%> (ø)
qbittorrentapi/request.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rmartin16 rmartin16 force-pushed the user-config-cookie-name branch from 45402ae to 03441c6 Compare January 15, 2023 20:42
@rmartin16 rmartin16 force-pushed the user-config-cookie-name branch 2 times, most recently from 30438ac to c73b09e Compare February 8, 2023 15:24
@rmartin16 rmartin16 force-pushed the user-config-cookie-name branch from c73b09e to d0c0361 Compare February 8, 2023 15:41
@rmartin16 rmartin16 changed the base branch from dev to main February 8, 2023 15:52
@rmartin16 rmartin16 merged commit 626eb46 into main Feb 8, 2023
@rmartin16 rmartin16 deleted the user-config-cookie-name branch February 8, 2023 16:06
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