update
This commit is contained in:
+5
-5
@@ -348,17 +348,17 @@ class RadarrClient:
|
||||
imdb_id = imdb_id if imdb_id.startswith("tt") else f"tt{imdb_id}"
|
||||
_log("DEBUG", f"Radarr API: Looking up movie by IMDb ID: {imdb_id}")
|
||||
|
||||
# Try direct movie search first
|
||||
res = self._get("/api/v3/movie", {"imdbId": imdb_id})
|
||||
# Radarr's IMDb filtering is unreliable, so fetch all movies and filter client-side
|
||||
res = self._get("/api/v3/movie")
|
||||
if isinstance(res, list):
|
||||
# Filter results to find exact IMDb ID match
|
||||
for movie in res:
|
||||
if movie.get("imdbId") == imdb_id:
|
||||
_log("DEBUG", f"Radarr API: Found exact match: {movie.get('title')} (ID: {movie.get('id')})")
|
||||
return movie
|
||||
_log("WARNING", f"Radarr API: Got {len(res)} movies but none match IMDb {imdb_id}")
|
||||
_log("WARNING", f"Radarr API: Searched {len(res)} movies but none match IMDb {imdb_id}")
|
||||
|
||||
# Try lookup endpoint
|
||||
# Fallback: Try lookup endpoint
|
||||
res = self._get("/api/v3/movie/lookup/imdb", {"imdbId": imdb_id})
|
||||
if isinstance(res, dict) and res.get("id") and res.get("imdbId") == imdb_id:
|
||||
_log("DEBUG", f"Radarr API: Found movie via lookup: {res.get('title')} (ID: {res.get('id')})")
|
||||
@@ -395,7 +395,7 @@ class RadarrClient:
|
||||
page_size = 1000
|
||||
|
||||
while True:
|
||||
data = self._get("/api/v3/history/movie", {
|
||||
data = self._get("/api/v3/history", {
|
||||
"movieId": movie_id, "page": page, "pageSize": page_size,
|
||||
"sortKey": "date", "sortDirection": "ascending"
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user