Merge pull request #394 from juandbc/fix-torznab-process-and-jackett-movies-search

Fix torznab process and jackett movies search
This commit is contained in:
Maximilian Dorninger
2026-02-02 17:42:49 +01:00
committed by GitHub
2 changed files with 13 additions and 5 deletions

View File

@@ -78,5 +78,5 @@ class Jackett(GenericIndexer, TorznabMixin):
return self.search(query=query, is_tv=True)
def search_movie(self, query: str, movie: Movie) -> list[IndexerQueryResult]:
log.debug(f"Searching for movie {movie.title}")
log.debug(f"Searching for movie {movie.name}")
return self.search(query=query, is_tv=False)

View File

@@ -61,15 +61,23 @@ class TorznabMixin:
if upload_volume_factor == 2:
flags.append("doubleupload")
if not item.find("size") or item.find("size").text is None:
title = item.find("title").text
size_str = item.find("size")
if size_str is None or size_str.text is None:
log.warning(
f"Torznab item {item.find('title').text} has no size, skipping."
f"Torznab item {title} has no size, skipping."
)
continue
try:
size = int(size_str.text or "0")
except ValueError:
log.warning(
f"Torznab item {title} has invalid size, skipping."
)
continue
size = int(item.find("size").text or "0")
result = IndexerQueryResult(
title=item.find("title").text or "unknown",
title=title or "unknown",
download_url=str(item.find("enclosure").attrib["url"]),
seeders=seeders,
flags=flags,