Skip to content

Commit

Permalink
fix: slightly improve anime results
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy committed Jul 19, 2024
1 parent ae302a9 commit c9f230c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion comet/api/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,12 @@ async def stream(request: Request, b64config: str, type: str, id: str):
f"Start of {indexer_manager_type} search for {log_name} with indexers {config['indexers']}"
)

search_terms = [name] if not kitsu else [f"{name} {episode}"]
search_terms = [name]
if type == "series":
if not kitsu:
search_terms.append(f"{name} S0{season}E0{episode}")
else:
search_terms.append(f"{name} {episode}")
tasks.extend(
get_indexer_manager(
session, indexer_manager_type, config["indexers"], term
Expand Down
4 changes: 2 additions & 2 deletions comet/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ async def filter(torrents: list, name: str):
results = []
for torrent in torrents:
index = torrent[0]
torrent = torrent[1]
title = torrent[1]

if title_match(name, parse(torrent).parsed_title):
if title_match(name, parse(title).parsed_title):
results.append((index, True))
continue

Expand Down

0 comments on commit c9f230c

Please sign in to comment.