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

Enable customizing the save statistics time interval #21291

Merged
merged 5 commits into from
Sep 16, 2024

Conversation

burnerelu
Copy link
Contributor

@burnerelu burnerelu commented Sep 3, 2024

This change extends the Advanced section of the Preferences menu with a new field, allowing changing the time statistics save interval. A null value will prevent recurrent saving.

This aims to provide the feature requested in issue #21285

Tested updating the value from the web UI and reading it from the local client and the other way around. Did not test the actual file update time, as I did not touch the mechanism below the saveStatistics function.

I did not extend the lang/translation files as I wasn't sure I was supposed to. This is my first contribution to qBittorent, so I'm not familiar with the WoW

image

image

closes #21285

Replaced hardcoded statistics save interval with configurable value
New entry located in Advanced section
Closes qbittorrent#21285
@thalieht
Copy link
Contributor

thalieht commented Sep 3, 2024

I would put this setting near "Save resume data interval"

src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
@thalieht
Copy link
Contributor

thalieht commented Sep 3, 2024

Did not test the actual file update time

Tested, works as intended.

Relocate the new option in the menu and moved the corresponding code around
@burnerelu
Copy link
Contributor Author

burnerelu commented Sep 4, 2024

Moved it according to @thalieht 's suggestion[1].

Also moved the corresponding code around to keep the ordering of the items & fixed the rest of the remarks.

[1]:

image

image

thalieht
thalieht previously approved these changes Sep 4, 2024
src/base/bittorrent/session.h Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.h Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
@Chocobo1 Chocobo1 added the Core label Sep 6, 2024
Copy link
Member

@Chocobo1 Chocobo1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, only one small comment.

src/gui/advancedsettings.h Outdated Show resolved Hide resolved
@Chocobo1 Chocobo1 added this to the 5.1 milestone Sep 14, 2024
@burnerelu
Copy link
Contributor Author

@Chocobo1 @glassez is there any formal process required to merge this pull req? anything else required from my side?

@Chocobo1 Chocobo1 merged commit e06b7f8 into qbittorrent:master Sep 16, 2024
14 checks passed
@Chocobo1
Copy link
Member

@burnerelu
Thank you!

@Chocobo1 @glassez is there any formal process required to merge this pull req? anything else required from my side?

Nah, just wait for someone's free time to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurable save statistics interval
4 participants