-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
WebUI: Show only hosts in tracker filter list #18190
WebUI: Show only hosts in tracker filter list #18190
Conversation
95acaa2
to
f155c79
Compare
Number of torrents containing each tracker never stop growing, as can be seen in second pic. It happens when i open another WebUI tab while another is still active. |
Maybe it's better to at least keep the protocol (i.e., http, https, udp)? |
maybe we do not need to distinguish it is http or udp? if the hostname is the same ? also I do not see the protocol in the GUI (I only used Linux GUI version) |
That's kind of weird, but I did reproduce it too I'll take a moment to look into why |
1b8a9dd
to
0d0f812
Compare
That's kind of weird. I still not figured out the reason the torrents list got apended again very time when there's more than two tabs open. I added some debug code in the rendering method: for (const [hash, tracker] of trackerList) {
console.log("tracker.torrents.length %o, %o", tracker.torrents.length, tracker.torrents)
trackerFilterList.appendChild(createLink(hash, tracker.url + ' (%1)', tracker.torrents.length));
} shows that |
the problem is related to the new added code: merged_torrents = trackerList.get(hash).torrents.concat(torrents); fixed with: merged_torrents = trackerList.get(hash).torrents.concat(torrents);
// deduplicate is needed when the webui opens in multi tabs
merged_torrents = merged_torrents.filter((item, pos) => merged_torrents.indexOf(item) === pos); but I think the the reason why we need the merge here is because the web ui api returned trackers may have different url for the same tracker. for some private trackers, it use diff url for each torrent even for the same tracker. for example:
so we got the api response of {
"trackers": {
"https://example.com/announce?passkey=identify_info1": ["hash1"],
"https://example.com/announce?passkey=identify_info2": ["hash2"],
"https://example.com/announce?passkey=identify_info3": ["hash3"]
}
} |
Well there is a user case at least for knowing what protocol this tracker is using. A quick debug, if all UDP tracker is not working may lead to the natural assumption that UDP is not working for your network instead of tracker not working. Just my 2 cents, thank you for the contribution nonetheless. |
There is no need to distinguish between protocols, in gui everything is fine with this, let it be the same here. |
Great job! @ttys3 |
I don't know if it's intentional but port 443 and 80 are not appended to the tracker in the filter list while every other port is (that i know of). |
While in the area of code responsible for trackers in the UI, is there a possibility to simply make the tracker table widget sortable by column header. Currently it is a fixed table which is a bit odd. i.e. https://stackoverflow.com/questions/22879397/sorting-tables-with-listview |
This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity. |
This comment was marked as spam.
This comment was marked as spam.
Right now the trackers are fixed instead of sortable so I don't think it is a problem. I guess the problem is that the torrent number minus 1 issue? This PR fixes quite a significant problem with some private tracker so it would be great if we can see this merged in 4.6. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi, any news about this, because it's really hard to check tracker list, because right now I can't expand it to "full" size to read whole info |
3d4623d
to
53743d5
Compare
just added some important comment in this commit: cca0d91 I almost forget why I add this code today, it took me a long time to remember why this code is required. so I think it should be put near the code. |
I support that. If torrents refer to several different hosts in the same domain, then this should make sense for them, otherwise why do these domains exist at all? In any case, why should we take responsibility for this? |
so, we all agree to change this? do I need to make the changes now? another thing is, keep the full hostname, do we need including the port ? @glassez @tearfur |
I second the motion to display host name instead of domain name as well. For port number, I think we need to figure out the level of granularity here. If we include port number, I think it is reasonable to include protocol as well. If we don't include protocol, then might as well leave out port number. |
No, I suggest another PR for these changes. |
Map is not needed Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
@qbittorrent/frequent-contributors |
My hunch is that not keeping the protocol and port number is better. I've never seen completely unrelated trackers exist under the same hostname, so it is probably a better idea to keep the text labels short. Started a new pull request at #19062 to follow up on this. |
I'm going to merge this, in order to unblock follow up improvements. |
Big thanks to @ttys3 and every participants here. |
the trackerlist url in the web ui sidebar currently is not friendly for private trackers.
this patch will make it consistent with the gui one, and more friendly for private trackers.
webui before:
webui with patch:
update 2023-05-30: