From bbb257dda87875bfcb0d236d1cd82e9a3781fdef Mon Sep 17 00:00:00 2001
From: Goldy <153996346+g0ldyy@users.noreply.github.com>
Date: Thu, 4 Jul 2024 12:04:08 +0200
Subject: [PATCH] feat: add option to toggle title checking
---
comet/api/stream.py | 6 ++----
comet/templates/index.html | 6 ++++++
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/comet/api/stream.py b/comet/api/stream.py
index 94d1012..5efa58b 100644
--- a/comet/api/stream.py
+++ b/comet/api/stream.py
@@ -170,14 +170,12 @@ async def stream(request: Request, b64config: str, type: str, id: str):
object = {
"Title": result["filename"],
"InfoHash": result["infoHash"],
- "zilean": True,
}
if indexer_manager_type == "prowlarr":
object = {
"title": result["filename"],
"infoHash": result["infoHash"],
- "zilean": True,
}
torrents.append(object)
@@ -195,9 +193,9 @@ async def stream(request: Request, b64config: str, type: str, id: str):
tasks = []
filtered = 0
+ filter_title = config["filterTitles"] if "filterTitles" in config else True # not needed when pydantic config validation system implemented
for torrent in torrents:
- # Only title match check if from Zilean
- if "zilean" in torrent:
+ if filter_title:
parsed_torrent = parse(
torrent["Title"]
if indexer_manager_type == "jackett"
diff --git a/comet/templates/index.html b/comet/templates/index.html
index bcb9b5b..34f744f 100644
--- a/comet/templates/index.html
+++ b/comet/templates/index.html
@@ -510,6 +510,10 @@