File size: 780 Bytes
a1c39ac | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | """One declarative service source for preferences, tabs, and recommendations."""
from __future__ import annotations
STREAMING_SERVICES = (
{"id": "prime-video", "label": "Prime Video"},
{"id": "apple-tv-plus", "label": "Apple TV+"},
{"id": "netflix", "label": "Netflix"},
{"id": "disney-plus", "label": "Disney+"},
{"id": "hulu", "label": "Hulu"},
)
def services_for_title(title_id: str) -> tuple[str, ...]:
"""Return stable local availability labels without claiming live access."""
index = sum(title_id.encode("utf-8")) % len(STREAMING_SERVICES)
result = [STREAMING_SERVICES[index]["id"]]
if int(title_id[-1], 16) % 3 == 0:
result.append(STREAMING_SERVICES[(index + 2) % len(STREAMING_SERVICES)]["id"])
return tuple(result)
|