-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add piece_extent_affinity to AdvancedSettings #11781
Add piece_extent_affinity to AdvancedSettings #11781
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you should make sure this PR will build nicely on our CI which is cumbersome work by adding #if conditionals here and there...
As a lazy coder, I would simply put off this PR till the time that specific libtorrent version is available widely.
Ugh, I totally forgot this setting is only available in libtorrent >= 1.2.x. So basically I have to wrap everything I wrote in #if (LIBTORRENT_VERSION_NUM >= 10200)
//code
#endif right? |
You got the idea right but not the version number. Libtorrent seems got that feature in 1.2.2 and you will need to use the correct version format. |
Yeah, right, should be
I was thinking of changing the description to |
Being helpful to readers you should have included in the opening comment a link to the docs for |
8808835
to
c9747a8
Compare
@Chocobo1 Ok now there are
|
By the way, I also tested with libtorrent 1.2.1 and verified that it was working as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only 2 minor comments left
c9747a8
to
f68f6ce
Compare
@Chocobo1 ready. |
@glassez Review please? |
f68f6ce
to
a9f577b
Compare
a9f577b
to
9132076
Compare
@Chocobo1 I found a better way of addressing your most recent comments. I moved the libtorrent version checks to the function bodies instead of the whole definitions and declarations, which allowed me to remove the checks in other places. I did not remove the versions checks from the GUI code because I think it is better that the option does not appear at all if it does nothing. On the WebUI code I had no choice but to always include the checkbox, and as per @glassez's suggestion, I also had no choice on the API side, in order to keep the API interface stable. |
Expose option in WebUI settings and WebAPI. Requires WebAPI version bump. Closes qbittorrent#11436.
9132076
to
ed96a07
Compare
@FranciscoPombal |
@glassez @Piccirello As a result of this PR, the preferences JSON returned by the WebAPI will potentially have one more key value pair, and it is now also be possible to change said field with the I believe this warrants a patch version bump of the WebAPI, since it is not a breaking change for existing clients. It is part of the API contract that the content returned by If it is ok with you, I'd rather this feature also be part of version 2.4.1 of the API, piggy-backing off of #11825 |
And expose option in WebUI settings.
More info:
https://libtorrent.org/single-page-ref.html#piece_extent_affinity