mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Fix security issues, breaking changes, and code cleanup for weather satellite PR
Co-authored-by: mitchross <6330506+mitchross@users.noreply.github.com>
This commit is contained in:
@@ -185,6 +185,11 @@ class WeatherSatDecoder:
|
||||
def current_frequency(self) -> float:
|
||||
return self._current_frequency
|
||||
|
||||
@property
|
||||
def device_index(self) -> int:
|
||||
"""Return current device index."""
|
||||
return self._device_index
|
||||
|
||||
def _detect_decoder(self) -> str | None:
|
||||
"""Detect which weather satellite decoder is available."""
|
||||
if shutil.which('satdump'):
|
||||
|
||||
@@ -51,14 +51,16 @@ class ScheduledPass:
|
||||
def start_dt(self) -> datetime:
|
||||
dt = datetime.fromisoformat(self.start_time)
|
||||
if dt.tzinfo is None:
|
||||
return dt.replace(tzinfo=timezone.utc)
|
||||
# Naive datetime - assume UTC
|
||||
dt = dt.replace(tzinfo=timezone.utc)
|
||||
return dt.astimezone(timezone.utc)
|
||||
|
||||
@property
|
||||
def end_dt(self) -> datetime:
|
||||
dt = datetime.fromisoformat(self.end_time)
|
||||
if dt.tzinfo is None:
|
||||
return dt.replace(tzinfo=timezone.utc)
|
||||
# Naive datetime - assume UTC
|
||||
dt = dt.replace(tzinfo=timezone.utc)
|
||||
return dt.astimezone(timezone.utc)
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user