feat: add API response to IMDB metadata retrieval error logs

This commit is contained in:
g0ldyy
2025-12-21 21:49:26 +01:00
parent a113f2ef0a
commit 242e83a7e1
+4 -1
View File
@@ -16,5 +16,8 @@ async def get_imdb_metadata(session: aiohttp.ClientSession, id: str):
year_end = int(element["yr"].split("-")[1]) if "yr" in element else None
return title, year, year_end
except Exception as e:
logger.warning(f"Exception while getting IMDB metadata for {id}: {e}")
additional_info = ""
if metadata:
additional_info = f"- API Response: {metadata}"
logger.warning(f"Exception while getting IMDB metadata for {id}: {e}{additional_info}")
return None, None, None