-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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: Add support for tracker status (error, warning) filter #22166
base: master
Are you sure you want to change the base?
Conversation
I didn't look at any details, but what caught my eye at first glance were the changes to the core classes, which clearly looks unexpected if you only need WebUI to follow regular UI. |
I could have done it everything in |
This is not at all how it behaves in GUI. The "error" filter matches a torrent if at least one tracker entry is in the appropriate "error" state. |
ok will change the logic to be that way, good to have it clarified. about modifying core classes, do you have a suggestion about it or is it fine? and in general, any other change suggestion? |
I changed my approach by using the serialize torrent handlers and avoid touching base folder. @Chocobo1 I tag you because I saw you made some enhancements in the areas I touch. Will appreciate your feedback :D. |
IIRC, currently WebUI trackers filter uses data provided by "trackers" field of |
I tried that option but found out it's simpler to calculate the final state on the backend where all the info is already available and expose it as new field I have the approach you suggested saved there in my stash, that's how I first approached and later found out it was too much info handling tl;dr: exposing all that info will be nice but for this simple use case I don't think it's worth it |
It is exactly how my suggestion based on "trackers" from {
"https://www.example1.com" : ["torrent1", "torrent2", "torrent3"],
"https://www.example2.com" : ["torrent1", "torrent2", "torrent3"],
"@warning" : ["torrent1", "torrent2", "torrent3"],
"@error" : ["torrent1", "torrent2", "torrent3"]
} |
Oh I see your point now. So something like this in if (!m_maindataSyncBuf.trackers.isEmpty())
{
QJsonObject trackers;
for (auto it = m_maindataSyncBuf.trackers.cbegin(); it != m_maindataSyncBuf.trackers.cend(); ++it)
trackers[it.key()] = QJsonArray::fromStringList(it.value());
trackers["@warning"] = hasWarningIds;
trackers["@error"] = hasTrackerErrorIds;
trackers["@other_error"] = hasErrorIds;
syncData[KEY_TRACKERS] = trackers;
} Curious what will be the benefit? |
implements #19672 in webui
behavior of categories: for context, we consider a tracker in error state whenever it is in either
NotWorking
,TrackerError
orUnreachable
. thusI think the "other error" category from the GUI could be renamed to "Network error" and replace "error" with "Tracker error". The later will be whenever the tracker responds with specific message extracted from libtorrent
open to suggestions :D
TODO:
will close #21960, close #21796, close #20276, close #20275, close #9849