Rev4540, More proper bigfile filtering for OptionalFileList
This commit is contained in:
parent
12013d64c8
commit
6fcfe5b394
2 changed files with 8 additions and 5 deletions
|
@ -139,7 +139,7 @@ class UiWebsocketPlugin(object):
|
||||||
wheres = {}
|
wheres = {}
|
||||||
wheres_raw = []
|
wheres_raw = []
|
||||||
if "bigfile" in filter:
|
if "bigfile" in filter:
|
||||||
wheres["size >"] = 1024 * 1024 * 10
|
wheres["size >"] = 1024 * 1024 * 1
|
||||||
if "downloaded" in filter:
|
if "downloaded" in filter:
|
||||||
wheres_raw.append("(is_downloaded = 1 OR is_pinned = 1)")
|
wheres_raw.append("(is_downloaded = 1 OR is_pinned = 1)")
|
||||||
if "pinned" in filter:
|
if "pinned" in filter:
|
||||||
|
@ -166,11 +166,14 @@ class UiWebsocketPlugin(object):
|
||||||
row["address"] = address
|
row["address"] = address
|
||||||
|
|
||||||
if row["size"] > 1024 * 1024:
|
if row["size"] > 1024 * 1024:
|
||||||
has_info = self.addBigfileInfo(row)
|
has_bigfile_info = self.addBigfileInfo(row)
|
||||||
else:
|
else:
|
||||||
has_info = False
|
has_bigfile_info = False
|
||||||
|
|
||||||
if not has_info:
|
if not has_bigfile_info and "bigfile" in filter:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not has_bigfile_info:
|
||||||
if row["is_downloaded"]:
|
if row["is_downloaded"]:
|
||||||
row["bytes_downloaded"] = row["size"]
|
row["bytes_downloaded"] = row["size"]
|
||||||
row["downloaded_percent"] = 100
|
row["downloaded_percent"] = 100
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.7.2"
|
self.version = "0.7.2"
|
||||||
self.rev = 4539
|
self.rev = 4540
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.test_parser = None
|
self.test_parser = None
|
||||||
|
|
Loading…
Reference in a new issue