Screenshots: season posters

The fake Sonarr sends season posters on request, generated per season.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 23:42:49 +02:00
co-authored by Claude Opus 5.5
parent ca28a3c9bb
commit 5b8100eb54
3 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -132,7 +132,11 @@ def sonarr(path, q):
return [x for x in series() if term in x["title"].lower()]
if path.endswith("/series"): return series()
if "/series/" in path and path.rsplit("/", 1)[1].isdigit():
return next(x for x in series() if x["id"] == int(path.rsplit("/", 1)[1]))
s = next(x for x in series() if x["id"] == int(path.rsplit("/", 1)[1]))
if q.get("includeSeasonImages") == ["true"]: # like Sonarr: season posters only on request, remote only
for se in s["seasons"]:
se["images"] = [{"coverType": "poster", "remoteUrl": "http://127.0.0.1:%d/remote/s%d-%d.jpg" % (SONARR, s["id"], se["seasonNumber"])}]
return s
if path.endswith("/episode"): return episodes(int(q["seriesId"][0]))
if path.endswith("/episodefile"): return []
if path.endswith("/qualityprofile"): return [{"id": 1, "name": "Any"}, {"id": 4, "name": "HD-1080p"}]