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

Fix missing parameter in setShareLimits #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imatimba
Copy link

@imatimba imatimba commented Nov 26, 2024

Hi, let me preface by saying this is the first time I touch C#.
qBittorrent 4.6.0 merged qbittorrent/qBittorrent#19294 adding a new required parameter to setShareLimit.
This pull request adds support for that only on versions 4.6.0 and up, to avoid issues for people still running older qBittorrent versions.
https://github.com/imatimba/QbtManager/blob/6beddfcd5aab5fedd6c0002d5cfbbd37ed8b912b/QbtManager/Program.cs#L200-L211 ⇽ I'm not sure if this logic is correct, but I couldn't find any errors testing different combinations of setShareLimit parameters.

Also took the liberty to change the log string of SetMaxLimits to use string interpolation, as the concatenations + ternary operator (added because of the version check) were becoming quite unreadable.

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