qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
26.06k stars 3.83k forks source link

"Download Priority" column sorts strangely #20892

Open taralx opened 1 month ago

taralx commented 1 month ago

qBittorrent & operating system versions

qBittorrent: 4.6.5 x64 Operating System: Windows 11 Pro

What is the problem?

Download priority sorts mixed < not downloaded < normal, which is very weird.

Steps to reproduce

  1. Open torrent.
  2. Select part of a folder and the entirety of another
  3. Sort by download priority.

Additional context

No response

Log(s) & preferences file(s)

No response

taralx commented 1 month ago

Pretty sure it's because we're doing a numeric sort on this enum: https://github.com/qbittorrent/qBittorrent/blob/455a04b68e12ea9b75fedb9e8abee428dec3d3d0/src/base/bittorrent/downloadpriority.h#L33-L41

glassez commented 1 month ago

Download priority sorts mixed < not downloaded < normal, which is very weird.

What exactly do you dislike? The fact that "mixed" goes before "don't download"?

taralx commented 1 month ago

The fact that it's not a logical progression. "Partial download (mixed)" should be between "no download" and "full download (normal)".

glassez commented 1 month ago

The fact that it's not a logical progression. "Partial download (mixed)" should be between "no download" and "full download (normal)".

"Mixed" doesn't mean "Partial download". It is not "download priority" at all, unlike the rest of the items. This is an extra item to represent a folder whose entries have different priorities. BTW, they are any mixed priorities, not necessarily including "Don't download". So the position you've proposed is even more confusing, IMO.

taralx commented 1 month ago

I don't see how it's more confusing. If I sort the column, I get mixed priority things at the top, but full downloads at the bottom. How is that sensible?

glassez commented 1 month ago

If I sort the column, I get mixed priority things at the top, but full downloads at the bottom.

One more time. "Mixed" doesn't mean "not full download". These can be mixed normal and high priorities, or high and maximum, etc. "Mixed" is not a priority, it cannot be compared with the priorities on the usual rules, so it is simply located on the edge of the list.