Skip to content

Fix missing parameter in setShareLimits#17

Open
imatimba wants to merge 1 commit intoWebreaper:masterfrom
imatimba:fix-setsharelimit
Open

Fix missing parameter in setShareLimits#17
imatimba wants to merge 1 commit intoWebreaper:masterfrom
imatimba:fix-setsharelimit

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