-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Persist additional trackers and load it on startup #23657
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
base: master
Are you sure you want to change the base?
Conversation
|
Questions:
qBittorrent/src/base/bittorrent/sessionimpl.cpp Lines 685 to 689 in ae7cc74
|
I would follow the regular update interval.
I would delete it. |
|
I think it makes sense to rename to |
done in 90b3ae3 |
src/base/bittorrent/sessionimpl.cpp
Outdated
| // start embedded tracker | ||
| enableTracker(isTrackerEnabled()); | ||
|
|
||
| // if AddTrackersFromURLEnabled is enabled, load trackers from "additional_trackers_from_url.txt" |
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.
The following code is enough self-descriptive so this comment is redundant.
| // if AddTrackersFromURLEnabled is enabled, load trackers from "additional_trackers_from_url.txt" |
src/base/bittorrent/sessionimpl.cpp
Outdated
| m_updateTrackersFromURLTimer->setInterval(24h); | ||
| connect(m_updateTrackersFromURLTimer, &QTimer::timeout, this, &SessionImpl::updateTrackersFromURL); | ||
|
|
||
| // if AddTrackersFromURLEnabled is enabled, redownload the file |
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.
The following code is enough self-descriptive so this comment is redundant.
| // if AddTrackersFromURLEnabled is enabled, redownload the file |
src/base/bittorrent/sessionimpl.cpp
Outdated
| return; | ||
| } | ||
|
|
||
| LogMsg(tr("Failed to load additional_trackers_from_url.txt. %1").arg(readResult.error().message), Log::WARNING); |
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.
| LogMsg(tr("Failed to load additional_trackers_from_url.txt. %1").arg(readResult.error().message), Log::WARNING); | |
| LogMsg(tr("Failed to load additional trackers from file. Reason: %1").arg(readResult.error().message), Log::WARNING); |
I meant something more advanced than you did. But I'm not insisting. |
Closes #23508.
As suggested in #23510 (comment)
Save a copy of the tracker list file downloaded when
Automatically append trackers from URL to new downloadsis enabled.Load the downloaded copy on startup (before calling
prepareStartup) so if a torrent was in the CLI param and the--skip-dialog=true, the newly added torrent will have all the additional trackers in the list.