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
+2
View File
@@ -11,6 +11,8 @@ python3 -c '
import catalog
for m in catalog.MOVIES: print("m%d|%s|%d|%s|%s" % (m[0], m[1], m[2], m[10][0], m[10][1]))
for s in catalog.SERIES: print("s%d|%s|%d|%s|%s" % (s[0], s[1], s[2], s[7][0], s[7][1]))
for s in catalog.SERIES:
for n in range(1, len(s[5]) + 1): print("s%d-%d|%s|Season %d|%s|%s" % (s[0], n, s[1], n, s[7][1], s[7][0]))
u = catalog.UPCOMING; print("m%d|%s|%d|%s|%s" % (u[0], u[1], u[2], u[3][0], u[3][1]))
' | while IFS='|' read -r id title year c1 c2; do
magick -size 500x750 "gradient:$c1-$c2" \
+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"}]