Skip to content

Commit

Permalink
fix: lower not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy committed Jul 8, 2024
1 parent cc1199a commit ff60d91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions comet/api/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions comet/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
]

Expand Down

0 comments on commit ff60d91

Please sign in to comment.