Switched stream status tracking to explicit online state.
CI / Formatting (push) Failing after 6s
CI / Linting (push) Successful in 6s
CI / Tests (push) Successful in 28s
CI / Type Checking (push) Successful in 8s
CI / Spelling (push) Successful in 6s

This commit is contained in:
2026-05-21 16:09:28 -04:00
parent 4d0ae3d1ea
commit c837b916c0
11 changed files with 385 additions and 219 deletions
+5 -1
View File
@@ -15,6 +15,7 @@
"""HTTP client for querying Owncast instance APIs."""
import json
from datetime import UTC, datetime
from http import HTTPStatus
from typing import TYPE_CHECKING, Any
@@ -125,8 +126,11 @@ class OwncastClient:
if new_state is None:
return None
observed_at = datetime.now(UTC)
try:
stream_state = StreamState.from_api_response(new_state, domain)
stream_state = StreamState.from_api_response(
new_state, domain, observed_at
)
except InvalidApiResponseError as e:
self.log.warning(
"[%s] Rejecting response to request on %s as response "