From 80f3f9d51104e2035e99a17851ecdc35ab14c925 Mon Sep 17 00:00:00 2001 From: krzotr Date: Wed, 3 Apr 2019 17:01:16 +0200 Subject: [PATCH] OptionalFileList - get list of not downloaded files We can use API command optionalFileList with parameter filter=not_downloaded to get list of all not downloaded files --- plugins/OptionalManager/UiWebsocketPlugin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/OptionalManager/UiWebsocketPlugin.py b/plugins/OptionalManager/UiWebsocketPlugin.py index 94d3f501..879fb0ad 100644 --- a/plugins/OptionalManager/UiWebsocketPlugin.py +++ b/plugins/OptionalManager/UiWebsocketPlugin.py @@ -132,8 +132,12 @@ class UiWebsocketPlugin(object): wheres_raw = [] if "bigfile" in filter: wheres["size >"] = 1024 * 1024 * 10 - if "downloaded" in filter: + + if "not_downloaded" in filter: + wheres["is_downloaded"] = 0 + elif "downloaded" in filter: wheres_raw.append("(is_downloaded = 1 OR is_pinned = 1)") + if "pinned" in filter: wheres["is_pinned"] = 1