From ff60d91091f465db1c5b06eeb3ad8efd064f2c24 Mon Sep 17 00:00:00 2001 From: Goldy <153996346+g0ldyy@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:58:16 +0200 Subject: [PATCH] fix: lower not needed --- comet/api/stream.py | 3 +-- comet/utils/general.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/comet/api/stream.py b/comet/api/stream.py index 8064962..de946d5 100644 --- a/comet/api/stream.py +++ b/comet/api/stream.py @@ -228,10 +228,9 @@ async def stream(request: Request, b64config: str, type: str, id: str): for i in range(0, len(torrents), chunk_size) ] - name_lower = name.lower() tasks = [] for chunk in chunks: - tasks.append(filter(chunk, name_lower, indexer_manager_type)) + tasks.append(filter(chunk, name, indexer_manager_type)) filtered_total = await asyncio.gather(*tasks) diff --git a/comet/utils/general.py b/comet/utils/general.py index 4d30a1d..5f9ab0f 100644 --- a/comet/utils/general.py +++ b/comet/utils/general.py @@ -277,17 +277,17 @@ async def get_zilean( return results -async def filter(torrents: list, name_lower: str, indexer_manager_type: str): +async def filter(torrents: list, name: str, indexer_manager_type: str): valid_torrents = [ torrent for torrent in torrents if title_match( - name_lower, + name, parse( torrent["Title"] if indexer_manager_type == "jackett" else torrent["title"] - ).parsed_title.lower(), + ).parsed_title, ) ]