diff options
| -rw-r--r-- | services/tmdb.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/services/tmdb.py b/services/tmdb.py index e749f09..3618168 100644 --- a/services/tmdb.py +++ b/services/tmdb.py @@ -224,9 +224,19 @@ async def director_info(director_name: str, key: str | None = None, client: http if not results: return {"image": None, "biography": None} - person = results[0] - image = poster_url(person.get("profile_path")) - biography = (person.get("biography") or "").strip() or None + person_id = results[0].get("id") + image = poster_url(results[0].get("profile_path")) + + # Fetch full person details to get biography + biography = None + if person_id: + detail_response = await active_client.get( + f"https://api.themoviedb.org/3/person/{person_id}", + params={"api_key": key or api_key()}, + ) + if detail_response.status_code == 200: + person_detail = detail_response.json() + biography = (person_detail.get("biography") or "").strip() or None return {"image": image, "biography": biography} except Exception: |
