Report TrackersList statuses statistics for torrent highlighting
ClosedPublic

Authored by trufanov on Nov 4 2019, 3:15 AM.

Details

Summary

This patch is required to let KTorrent to detect and highlight seeding torrents with different colors based on the state of their list of trackers.
It continues https://git.reviewboard.kde.org/r/130032/diff/2 suggestion.

  1. Now libKTorrent shall be able to distinguish timeout errors from others.
  2. A new method allows a client to grab a statistical info about the states of the trackers list: total number of trackers enabled, number of trackers that have error state, how many of them have timeout errors and how many have warning message in a status string.

The idea is to highlight completed torrents that have no chance to continue seeding (all trackers are disabled or have error state and none of which are timeouts) with red. Highlight torrents which seeding may continue automatically soon (all trackers are with error or warning state but some errors are timeouts) with some greenish. And to highlight torrents that supposed to be seeding but still have some warnings (all tracker states contain warning messages) with some yellowish.
In case at least one tracker reports OK state with no warning - it will be left green as default.

Test Plan

I'll submit a diff to KTorrent that enables the usage of this function.

Diff Detail

Repository
R472 KTorrent Library
Lint
Lint Skipped
Unit
Unit Tests Skipped
trufanov requested review of this revision.Nov 4 2019, 3:15 AM
trufanov created this revision.
stikonas accepted this revision.Nov 12 2019, 12:45 AM
This revision is now accepted and ready to land.Nov 12 2019, 12:45 AM
This revision was automatically updated to reflect the committed changes.