Spotify: alarms like every other key, any day (Sunday window is only for auto-fix)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-4
@@ -424,14 +424,11 @@ def check_http(chk, snap, ctx):
|
||||
|
||||
|
||||
def check_spotify(chk, snap, ctx):
|
||||
"""Spotify on NA Ingest must be playing the service playlist during the check's "windows"
|
||||
(Sunday service). Outside them the button just says what it is doing."""
|
||||
"""Spotify on NA Ingest must be playing the service playlist."""
|
||||
sp_ = snap.spotify
|
||||
if sp_ is None:
|
||||
return [("spotify", Result(OK))] # not read yet
|
||||
state = "CLOSED" if not sp_.get("running") else (sp_.get("state") or "?").upper()
|
||||
if not in_windows(chk.get("windows", []), ctx["now"]):
|
||||
return [("spotify", Result(OK if state == "PLAYING" else OFF, info=state))] # grey when not playing
|
||||
if not sp_.get("running"):
|
||||
return [("spotify", Result(ERR, "SPOTIFY CLOSED", named=True))]
|
||||
if state != "PLAYING":
|
||||
|
||||
Reference in New Issue
Block a user