From 12013d64c8ec1d101450672ed67773a05d4f2b31 Mon Sep 17 00:00:00 2001 From: Tamas Kocsis Date: Thu, 29 Oct 2020 01:38:49 +0100 Subject: [PATCH 1/3] Rev4539, Add more extensions to UiFileManager binary files --- plugins/UiFileManager/media/js/FileList.coffee | 2 +- plugins/UiFileManager/media/js/all.js | 4 ++-- src/Config.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/UiFileManager/media/js/FileList.coffee b/plugins/UiFileManager/media/js/FileList.coffee index 2e38c2ae..e5abc9b9 100644 --- a/plugins/UiFileManager/media/js/FileList.coffee +++ b/plugins/UiFileManager/media/js/FileList.coffee @@ -1,4 +1,4 @@ -BINARY_EXTENSIONS = ["png", "gif", "jpg", "pdf", "doc", "msgpack", "zip", "rar", "gz", "tar", "exe"] +BINARY_EXTENSIONS = ["png", "gif", "jpg", "pdf", "doc", "msgpack", "zip", "rar", "gz", "tar", "exe", "wav", "ogg", "ogm", "oga", "ogv", "mp3"] class FileList extends Class constructor: (@site, @inner_path, @is_owner=false) -> diff --git a/plugins/UiFileManager/media/js/all.js b/plugins/UiFileManager/media/js/all.js index e8f866ff..8827abef 100644 --- a/plugins/UiFileManager/media/js/all.js +++ b/plugins/UiFileManager/media/js/all.js @@ -2187,7 +2187,6 @@ }).call(this); - /* ---- FileItemList.coffee ---- */ @@ -2483,7 +2482,7 @@ hasProp = {}.hasOwnProperty, indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - BINARY_EXTENSIONS = ["png", "gif", "jpg", "pdf", "doc", "msgpack", "zip", "rar", "gz", "tar", "exe"]; + BINARY_EXTENSIONS = ["png", "gif", "jpg", "pdf", "doc", "msgpack", "zip", "rar", "gz", "tar", "exe", "wav", "ogg", "ogm", "oga", "ogv", "mp3"]; FileList = (function(superClass) { extend(FileList, superClass); @@ -2906,6 +2905,7 @@ }).call(this); + /* ---- UiFileManager.coffee ---- */ diff --git a/src/Config.py b/src/Config.py index 41c914f2..b214de85 100644 --- a/src/Config.py +++ b/src/Config.py @@ -14,7 +14,7 @@ class Config(object): def __init__(self, argv): self.version = "0.7.2" - self.rev = 4538 + self.rev = 4539 self.argv = argv self.action = None self.test_parser = None From 6fcfe5b3946ca9926496f863e02e6d637a538620 Mon Sep 17 00:00:00 2001 From: Tamas Kocsis Date: Thu, 29 Oct 2020 02:44:07 +0100 Subject: [PATCH 2/3] Rev4540, More proper bigfile filtering for OptionalFileList --- plugins/OptionalManager/UiWebsocketPlugin.py | 11 +++++++---- src/Config.py | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/OptionalManager/UiWebsocketPlugin.py b/plugins/OptionalManager/UiWebsocketPlugin.py index 103bbe84..0acc53cf 100644 --- a/plugins/OptionalManager/UiWebsocketPlugin.py +++ b/plugins/OptionalManager/UiWebsocketPlugin.py @@ -139,7 +139,7 @@ class UiWebsocketPlugin(object): wheres = {} wheres_raw = [] if "bigfile" in filter: - wheres["size >"] = 1024 * 1024 * 10 + wheres["size >"] = 1024 * 1024 * 1 if "downloaded" in filter: wheres_raw.append("(is_downloaded = 1 OR is_pinned = 1)") if "pinned" in filter: @@ -166,11 +166,14 @@ class UiWebsocketPlugin(object): row["address"] = address if row["size"] > 1024 * 1024: - has_info = self.addBigfileInfo(row) + has_bigfile_info = self.addBigfileInfo(row) 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"]: row["bytes_downloaded"] = row["size"] row["downloaded_percent"] = 100 diff --git a/src/Config.py b/src/Config.py index b214de85..fb90e935 100644 --- a/src/Config.py +++ b/src/Config.py @@ -14,7 +14,7 @@ class Config(object): def __init__(self, argv): self.version = "0.7.2" - self.rev = 4539 + self.rev = 4540 self.argv = argv self.action = None self.test_parser = None From e2b1cf393801cbd0138f4f704841e7f19c5053fb Mon Sep 17 00:00:00 2001 From: Tamas Kocsis Date: Thu, 29 Oct 2020 02:49:04 +0100 Subject: [PATCH 3/3] Revert "Travis CI: Run a current version of pytest (#2648)" This reverts commit 147dd4bc35e3ae44ecec79e49a8c5c563f698a3f. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 895b3e93..bdaafa22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ services: cache: pip before_install: - pip install --upgrade pip wheel - - pip install --upgrade codecov coveralls flake8 pytest pytest-cov selenium + - pip install --upgrade codecov coveralls flake8 mock pytest==4.6.3 pytest-cov selenium # - docker build -t zeronet . # - docker run -d -v $PWD:/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 zeronet install: