Skip to content

Commit

Permalink
Keyword blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Nov 24, 2024
1 parent 3734c66 commit 4bd549d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/trackers/OE.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions src/trackers/RF.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/trackers/RTF.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4bd549d

Please sign in to comment.