Scrape: restore full-size movie poster URL for UMD video covers

This commit is contained in:
2026-09-07 16:20:39 -04:00
parent 27e482d344
commit 7d8b449846
+3 -1
View File
@@ -1400,7 +1400,7 @@ def get_movie_metadata(title, timeout=10):
# Manual linking (pick the correct movie/game when the auto-match is wrong) # Manual linking (pick the correct movie/game when the auto-match is wrong)
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
def search_movies(query, limit=20, timeout=10): def search_movies(query, limit=20, timeout=10):
"""Return [{id, title, year, overview, thumb_url, source}] for a movie search. """Return [{id, title, year, overview, thumb_url, image_url, source}] for a movie search.
TheMovieDB first; keyless Wikipedia page titles as a fallback. TheMovieDB first; keyless Wikipedia page titles as a fallback.
""" """
@@ -1422,6 +1422,7 @@ def search_movies(query, limit=20, timeout=10):
"year": (r.get("release_date") or "")[:4], "year": (r.get("release_date") or "")[:4],
"overview": (r.get("overview") or "").strip(), "overview": (r.get("overview") or "").strip(),
"thumb_url": (_TMDB_IMAGE + "w185" + poster) if poster else "", "thumb_url": (_TMDB_IMAGE + "w185" + poster) if poster else "",
"image_url": (_TMDB_IMAGE + "w500" + poster) if poster else "",
"source": "tmdb", "source": "tmdb",
}) })
if not out: if not out:
@@ -1432,6 +1433,7 @@ def search_movies(query, limit=20, timeout=10):
"year": "", "year": "",
"overview": "", "overview": "",
"thumb_url": "", "thumb_url": "",
"image_url": "",
"source": "wikipedia", "source": "wikipedia",
}) })
return out[:limit] return out[:limit]