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

Support fetching tracker list from URL #21828

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Piccirello
Copy link
Member

This feature is adapted from qBittorrent-Enhanced-Edition to allow for automatically adding trackers retrieved from a URL. @ngosang's trackerlist repo is a good example, however I've opted not to include a default URL.

Partially addresses #14535.

@Piccirello Piccirello added this to the 5.1 milestone Nov 13, 2024
@Piccirello Piccirello requested a review from a team November 13, 2024 01:09
@thalieht
Copy link
Contributor

I see only 1 problem: The box for Automatically append these trackers to new downloads is now too short in GUI, it was 8 lines high and now it's 4.5 (on my machine).

@stalkerok
Copy link
Contributor

Supersedes? #20115

@Piccirello
Copy link
Member Author

I see only 1 problem: The box for Automatically append these trackers to new downloads is now too short in GUI, it was 8 lines high and now it's 4.5 (on my machine).

In my testing, the height is unchanged compared to master on linux and v5.0.0 on macOS.

Supersedes? #20115

Ah yes - I hadn't noticed that PR. These seem to be based off of the same original code.

@Piccirello Piccirello marked this pull request as ready for review November 18, 2024 21:40
@Chocobo1 Chocobo1 added the Core label Nov 22, 2024
@stalkerok
Copy link
Contributor

Tested! Did not test WebUI.

@ngosang
Copy link
Member

ngosang commented Nov 23, 2024

I maintain https://github.com/ngosang/trackerslist since 8 years ago and I will keep maintaining it. It's used by several opensource projects. I have been contributor of qBittorrent long time ago too. You can add it as default if you want to.

https://github.com/ngosang/trackerslist/graphs/contributors

@Piccirello
Copy link
Member Author

I maintain https://github.com/ngosang/trackerslist since 8 years ago and I will keep maintaining it. It's used by several opensource projects. I have been contributor of qBittorrent long time ago too. You can add it as default if you want to.

https://github.com/ngosang/trackerslist/graphs/contributors

The reason I opted not to include a default tracker list was due to potential legal concerns. If this isn't an issue, I can use your list. (cc @qbittorrent/lead-developers)

@stalkerok
Copy link
Contributor

I think adding a default link is not a good idea. Everyone uses different services with a list of trackers, I use https://newtrackon.com/.

@Piccirello Piccirello requested a review from a team December 6, 2024 17:21
src/base/bittorrent/sessionimpl.h Outdated Show resolved Hide resolved
src/base/bittorrent/session.h Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
@Piccirello Piccirello requested a review from glassez December 14, 2024 19:38
@glassez glassez requested a review from a team December 16, 2024 18:00
src/webui/www/private/views/preferences.html Outdated Show resolved Hide resolved
src/webui/www/private/views/preferences.html Outdated Show resolved Hide resolved
src/webui/www/private/views/preferences.html Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.h Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.h Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
@@ -749,6 +764,9 @@ namespace BitTorrent
bool m_IPFilteringConfigured = false;
mutable bool m_listenInterfaceConfigured = false;

QString m_additionalTrackersFromURL;
Copy link
Member

Choose a reason for hiding this comment

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

Seems you don't really need this since you already have m_additionalTrackerEntriesFromURL.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is mostly useful for the comparison against the existing tracker list to determine if we need to call populateAdditionalTrackersFromURL(), though it's also used to get the list of trackers to display. We could instead do the comparison against QList<TrackerEntry> m_additionalTrackerEntriesFromURL and parse this every time, but it seemed easier to keep around the QString.

Trackers specified at the URL will be added to newly added public torrents.
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.

6 participants