Skip to content

Conversation

@vafada
Copy link
Contributor

@vafada vafada commented Dec 25, 2025

Closes #23508.

As suggested in #23510 (comment)

Save a copy of the tracker list file downloaded when Automatically append trackers from URL to new downloads is 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.

@vafada
Copy link
Contributor Author

vafada commented Dec 25, 2025

Questions:

  • Do we need to delete the additional_trackers.txt if the Automatically append trackers from URL to new downloads option was unchecked?
  • Do we need to re-download the file on startup if the additional_trackers.txt exists? Maybe download it only when additional_trackers.txt doesn't exists (previous version of qBittorrent)

if (isAddTrackersFromURLEnabled())
{
updateTrackersFromURL();
m_updateTrackersFromURLTimer->start();
}

@glassez
Copy link
Member

glassez commented Dec 26, 2025

  • Do we need to re-download the file on startup if the additional_trackers.txt exists?

I would follow the regular update interval.

  • Do we need to delete the additional_trackers.txt if the Automatically append trackers from URL to new downloads option was unchecked?

I would delete it.

stalkerok
stalkerok previously approved these changes Jan 7, 2026
@stalkerok
Copy link
Contributor

I think it makes sense to rename to additional_trackers_from_url.txt

@vafada
Copy link
Contributor Author

vafada commented Jan 7, 2026

I think it makes sense to rename to additional_trackers_from_url.txt

done in 90b3ae3

@vafada vafada requested a review from stalkerok January 7, 2026 21:39
stalkerok
stalkerok previously approved these changes Jan 7, 2026
// start embedded tracker
enableTracker(isTrackerEnabled());

// if AddTrackersFromURLEnabled is enabled, load trackers from "additional_trackers_from_url.txt"
Copy link
Member

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.

Suggested change
// if AddTrackersFromURLEnabled is enabled, load trackers from "additional_trackers_from_url.txt"

m_updateTrackersFromURLTimer->setInterval(24h);
connect(m_updateTrackersFromURLTimer, &QTimer::timeout, this, &SessionImpl::updateTrackersFromURL);

// if AddTrackersFromURLEnabled is enabled, redownload the file
Copy link
Member

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.

Suggested change
// if AddTrackersFromURLEnabled is enabled, redownload the file

return;
}

LogMsg(tr("Failed to load additional_trackers_from_url.txt. %1").arg(readResult.error().message), Log::WARNING);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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);

@glassez
Copy link
Member

glassez commented Jan 8, 2026

Do we need to re-download the file on startup if the additional_trackers.txt exists?

I would follow the regular update interval.

I meant something more advanced than you did. But I'm not insisting.

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.

CLI doesn't append trackers from URL

3 participants