mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-10 00:46:48 -06:00
Make the active torrents filter reflect actual transfers
PR #23431. Closes #23121.
This commit is contained in:
parent
1b96a48266
commit
4a3922d152
@ -1186,25 +1186,7 @@ bool TorrentImpl::isCompleted() const
|
|||||||
|
|
||||||
bool TorrentImpl::isActive() const
|
bool TorrentImpl::isActive() const
|
||||||
{
|
{
|
||||||
switch (m_state)
|
return ((uploadPayloadRate() > 0) || (downloadPayloadRate() > 0));
|
||||||
{
|
|
||||||
case TorrentState::StalledDownloading:
|
|
||||||
return (uploadPayloadRate() > 0);
|
|
||||||
|
|
||||||
case TorrentState::DownloadingMetadata:
|
|
||||||
case TorrentState::ForcedDownloadingMetadata:
|
|
||||||
case TorrentState::Downloading:
|
|
||||||
case TorrentState::ForcedDownloading:
|
|
||||||
case TorrentState::Uploading:
|
|
||||||
case TorrentState::ForcedUploading:
|
|
||||||
case TorrentState::Moving:
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
};
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TorrentImpl::isInactive() const
|
bool TorrentImpl::isInactive() const
|
||||||
|
|||||||
@ -1552,7 +1552,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
applyFilter(row, filterName, category, tag, trackerHost, filterTerms) {
|
applyFilter(row, filterName, category, tag, trackerHost, filterTerms) {
|
||||||
const state = row["full_data"].state;
|
const { state, upspeed, dlspeed } = row["full_data"];
|
||||||
let inactive = false;
|
let inactive = false;
|
||||||
|
|
||||||
switch (filterName) {
|
switch (filterName) {
|
||||||
@ -1592,11 +1592,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||||||
inactive = true;
|
inactive = true;
|
||||||
// fallthrough
|
// fallthrough
|
||||||
case "active": {
|
case "active": {
|
||||||
let r;
|
const r = (upspeed > 0) || (dlspeed > 0);
|
||||||
if (state === "stalledDL")
|
|
||||||
r = (row["full_data"].upspeed > 0);
|
|
||||||
else
|
|
||||||
r = (state === "metaDL") || (state === "forcedMetaDL") || (state === "downloading") || (state === "forcedDL") || (state === "uploading") || (state === "forcedUP");
|
|
||||||
if (r === inactive)
|
if (r === inactive)
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user