diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-16 17:31:03 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-16 17:31:03 +0100 |
| commit | 26b2f3255dea0ee13c562ffcfd8d641fd976d5f8 (patch) | |
| tree | d984fb4d08878b2ad7858f2c582707409952f9f0 /deckit/modules | |
| parent | db13056723c0c13fcf9ea98ed258a619f9654ab8 (diff) | |
| download | deck-it-26b2f3255dea0ee13c562ffcfd8d641fd976d5f8.tar.gz deck-it-26b2f3255dea0ee13c562ffcfd8d641fd976d5f8.zip | |
fix(xbox): a refused console list no longer blanks the tab; tab icon
xccs answers 403 from its gateway while every other Xbox Live endpoint
answers, and that one failure marked the whole tab offline. The console
list now fails on its own, the tab says console control is unavailable,
and the rest reads. The Xbox tab gets the Xbox glyph like the others.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'deckit/modules')
| -rw-r--r-- | deckit/modules/xbox.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/deckit/modules/xbox.py b/deckit/modules/xbox.py index 8efa426..c8fb581 100644 --- a/deckit/modules/xbox.py +++ b/deckit/modules/xbox.py @@ -354,7 +354,13 @@ class Xbox: # --- reads ---------------------------------------------------------- def read_fast(self): presence = summarize_presence(self.api(PRESENCE, 3)) - consoles = summarize_consoles(self.api(DEVICES, 4, extra=SG)) + try: + consoles = summarize_consoles(self.api(DEVICES, 4, extra=SG)) + except HttpError as e: + # xccs sits behind its own gateway and can refuse alone; the rest still reads. + if e.status == 401: + raise + consoles, self.reason = self.data.get("consoles") or [], f"consoles: {e}" self.data = {**self.data, "presence": presence, "consoles": consoles} def read_slow(self): |
