From 4bd549d113abc2099994333ddf43f43075ba88e2 Mon Sep 17 00:00:00 2001 From: Audionut Date: Sun, 24 Nov 2024 12:19:23 +1000 Subject: [PATCH] Keyword blocking --- src/trackers/OE.py | 3 +++ src/trackers/RF.py | 4 ++++ src/trackers/RTF.py | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/src/trackers/OE.py b/src/trackers/OE.py index b101d222..d71d7b26 100644 --- a/src/trackers/OE.py +++ b/src/trackers/OE.py @@ -47,6 +47,9 @@ def __init__(self, config): pass async def upload(self, meta, disctype): + if 'concert' in meta['keywords']: + console.print('[bold red]Concerts not allowed.') + return common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await self.edit_desc(meta, self.tracker, self.signature) diff --git a/src/trackers/RF.py b/src/trackers/RF.py index 64f73a4a..3c0dc993 100644 --- a/src/trackers/RF.py +++ b/src/trackers/RF.py @@ -33,6 +33,10 @@ def __init__(self, config): pass async def upload(self, meta, disctype): + disallowed_keywords = {'XXX', 'Erotic'} + if any(keyword in meta['keywords'] for keyword in disallowed_keywords): + console.print('[bold red]Concerts not allowed.') + return if meta.get('category') == "TV": console.print('[bold red]This site only ALLOWS Movies.') return diff --git a/src/trackers/RTF.py b/src/trackers/RTF.py index 5b4a6731..485c886c 100644 --- a/src/trackers/RTF.py +++ b/src/trackers/RTF.py @@ -30,6 +30,10 @@ def __init__(self, config): pass async def upload(self, meta, disctype): + disallowed_keywords = {'XXX', 'Erotic'} + if any(keyword in meta['keywords'] for keyword in disallowed_keywords): + console.print('[bold red]Concerts not allowed.') + return if datetime.date.today().year - meta['year'] <= 9: console.print("[red]ERROR: Not uploading!\nMust be older than 10 Years as per rules") return