[videos] IMDB blew us up again, switch to TMdb
Some checks failed
build & deploy / test (push) Has been cancelled
build & deploy / deploy (push) Has been cancelled

This commit is contained in:
2026-03-19 21:16:12 -04:00
parent 349b10904a
commit 373db5563a
2 changed files with 4 additions and 7 deletions

View File

@ -195,7 +195,7 @@ class Series(TimeStampedModel):
name_or_id = self.name
if self.imdb_id:
name_or_id = self.imdb_id
video_metadata: VideoMetadata = lookup_video_from_imdb(name_or_id)
video_metadata: VideoMetadata = lookup_video_from_tmdb(name_or_id)
if not video_metadata.title:
logger.warning(f"No imdb data for {self}")
@ -220,7 +220,7 @@ class Series(TimeStampedModel):
logger.info("Series not created and overwrite=False, returning")
return series
vdict, _, cover, genres = lookup_video_from_imdb(
vdict, _, cover, genres = lookup_video_from_tmdb(
imdb_id
).as_dict_with_cover_and_genres()
vdict.pop("video_type")
@ -392,7 +392,7 @@ class Video(ScrobblableMixin):
if not created and not overwrite:
return video
vdict, series_id, cover, genres = lookup_video_from_imdb(
vdict, series_id, cover, genres = lookup_video_from_tmdb(
imdb_id
).as_dict_with_cover_and_genres()

View File

@ -24,12 +24,9 @@ def lookup_video_from_tmdb(
from videos.models import Series
imdb_id = name_or_id
if name_or_id.startswith("tt"):
imdb_id = name_or_id[2:]
video_metadata = VideoMetadata(imdb_id=imdb_id)
tmdb_result = tmdb.find().by_imdb("tt" + imdb_id)
tmdb_result = tmdb.find().by_imdb(imdb_id)
if not tmdb_result:
logger.info(