openscopeproject / TrguiNG

Remote GUI for Transmission torrent daemon
GNU Affero General Public License v3.0
334 stars 39 forks source link

Don't show subdomains in tracker filter list #51

Closed Pentaphon closed 1 year ago

Pentaphon commented 1 year ago

Please remove the subdomains from tracker filter list view.

For example, if the announce URL is tracker.privatesite.org, the only important parts are the top-level and 2nd level domain, so it should be shown only as privatesite.org. Why?

1) It saves space on the tracker filter view panel since the URLs are now all shorter by not showing the rather useless subdomain. 2) It creates a more uniform filter view list since some announce URLs have subdomains and some do not, making it more readable.

This is especially useful for private trackers which use all sorts of announce URLs as well as people who add many public announce URLs to their torrents.

Thanks.

qu1ck commented 1 year ago

This is one of those things that is absolutely technically wrong but is useful in practice. I'll do it but not for the reasons you outlined but because some trackers have multiple numbered subdomains that don't get grouped up. It will lead to some different trackers being erroneously grouped up if they share the 2nd level domain but first situation is much more common than second.

qu1ck commented 1 year ago

After looking into it more the trackers sharing a domain is not uncommon. So I think I found a reasonable middle ground with heuristic that cuts off common prefixes like tracker. and bt3. from the domain but otherwise keeps it intact.

If you run into some other common prefix that makes sense to ignore let me know.

Pentaphon commented 1 year ago

Thanks. Not my preferred solution since I don't really care if trackers with the same domain get grouped up because I only need to filter torrents by their domains, not their unique subdomains. Also, If a tracker URL ever goes down, which is common, I'm not going to use their other subdomain URL since that will probably also go down, but another server altogether. Personally, I'd prefer if you just allowed the grouping to happen but this works for the most part and is a huge improvement in readability.

Others I have seen from collections like https://github.com/ngosang/trackerslist are

t for tracker tr for tracker opentracker for URLs using that software open for a shortened version of the above.

qu1ck commented 1 year ago

Added a few more common subdomains.

The problem with ignoring all subdomains is that, for example, some completely different sites with different content use the same tracker.wf domain for their trackers (with different subdomains). It would definitely be a mistake to group those up. Current solution is not ideal but it's best I could think of.

qu1ck commented 1 year ago

Implemented in v0.8.0.

Pentaphon commented 2 months ago

@qu1ck any chance you can add the ability for users to add their own subdomains? The uncommon ones you find in private trackers and some public trackers? Perhaps in a filter list entry in the interface tab in settings that already has the common ones added to it? Just an idea I had while looking at my tracker list. I'll open another issue if need but figured I'd use this existing one to ask if you are interested in such a feature.

qu1ck commented 2 months ago

Sure, open an issue.