refactor(tags): Simplify Simkl search logic and soft-fail when no results found

This commit is contained in:
Andy
2025-08-07 17:55:35 +00:00
parent 9eb6bdbe12
commit 460878777d

View File

@@ -64,6 +64,11 @@ def search_simkl(title: str, year: Optional[int], kind: str) -> Tuple[Optional[d
data = resp.json()
log.debug("Simkl API response received")
# Handle case where SIMKL returns empty list (no results)
if isinstance(data, list):
log.debug("Simkl returned list (no matches) for %r", filename)
return None, None, None
# Handle TV show responses
if data.get("type") == "episode" and "show" in data:
show_info = data["show"]