mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-23 09:47:08 +03:00
Fix paused, active and inactive filters
This commit is contained in:
parent
b10f04abbd
commit
2691bb1540
1 changed files with 11 additions and 6 deletions
|
@ -616,6 +616,9 @@ var TorrentsTable = new Class({
|
||||||
|
|
||||||
applyFilter : function (row, filterName, labelName) {
|
applyFilter : function (row, filterName, labelName) {
|
||||||
var state = row['full_data'].state;
|
var state = row['full_data'].state;
|
||||||
|
var inactive = false;
|
||||||
|
var r;
|
||||||
|
|
||||||
switch(filterName) {
|
switch(filterName) {
|
||||||
case 'downloading':
|
case 'downloading':
|
||||||
if (state != 'downloading' && !~state.indexOf('DL'))
|
if (state != 'downloading' && !~state.indexOf('DL'))
|
||||||
|
@ -630,19 +633,21 @@ var TorrentsTable = new Class({
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 'paused':
|
case 'paused':
|
||||||
if (state != 'pausedDL')
|
if (!~state.indexOf('paused'))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 'resumed':
|
case 'resumed':
|
||||||
if (~state.indexOf('paused'))
|
if (~state.indexOf('paused'))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 'active':
|
|
||||||
if (state != 'downloading' && state != 'forcedDL' && state != 'uploading' && state != 'forcedUP')
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case 'inactive':
|
case 'inactive':
|
||||||
if (state == 'downloading' || state == 'forcedDL' || state == 'uploading' || state == 'forcedUP')
|
inactive = true;
|
||||||
|
case 'active':
|
||||||
|
if (state == 'stalledDL')
|
||||||
|
r = (row['full_data'].upspeed > 0)
|
||||||
|
else
|
||||||
|
r = state == 'metaDL' || state == 'downloading' || state == 'forcedDL' || state == 'uploading' || state == 'forcedUP';
|
||||||
|
if (r == inactive)
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 'errored':
|
case 'errored':
|
||||||
|
|
Loading…
Reference in a new issue