From f4235ba2e29afdbc817f8cdf97709b9cc2a2410d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 28 Jul 2021 22:12:39 +0100 Subject: [PATCH] Shared item content is filtered --- shares.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shares.py b/shares.py index 8780f405d..654289ad7 100644 --- a/shares.py +++ b/shares.py @@ -34,6 +34,7 @@ from utils import isAccountDir from utils import acctDir from utils import isfloat from media import processMetaData +from filters import isFiltered def _loadDfcIds(baseDir: str, systemLanguage: str) -> {}: @@ -239,6 +240,11 @@ def addShare(baseDir: str, systemLanguage: str, translate: {}) -> None: """Adds a new share """ + if isFiltered(baseDir, nickname, domain, + displayName + ' ' + summary + ' ' + + itemType + ' ' + itemCategory): + print('Shared item was filtered due to content') + return sharesFilename = acctDir(baseDir, nickname, domain) + '/shares.json' sharesJson = {} if os.path.isfile(sharesFilename):