mirror of
https://github.com/g0ldyy/comet.git
synced 2026-01-12 01:16:12 +01:00
feat: add API response to IMDB metadata retrieval error logs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user