mirror of
https://github.com/smittix/intercept.git
synced 2026-06-11 15:33:32 -07:00
v2.26.0: fix SSE fanout crash and branded logo FOUC
- Fix SSE fanout thread AttributeError when source queue is None during interpreter shutdown by snapshotting to local variable with null guard - Fix branded "i" logo rendering oversized on first page load (FOUC) by adding inline width/height to SVG elements across 10 templates - Bump version to 2.26.0 in config.py, pyproject.toml, and CHANGELOG.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,18 +7,17 @@ and routine communications per ITU-R M.493.
|
||||
"""
|
||||
|
||||
from .constants import (
|
||||
FORMAT_CODES,
|
||||
DISTRESS_NATURE_CODES,
|
||||
TELECOMMAND_CODES,
|
||||
CATEGORY_PRIORITY,
|
||||
DISTRESS_NATURE_CODES,
|
||||
FORMAT_CODES,
|
||||
MID_COUNTRY_MAP,
|
||||
TELECOMMAND_CODES,
|
||||
)
|
||||
|
||||
from .parser import (
|
||||
parse_dsc_message,
|
||||
get_country_from_mmsi,
|
||||
get_distress_nature_text,
|
||||
get_format_text,
|
||||
parse_dsc_message,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
|
||||
+10
-12
@@ -27,24 +27,23 @@ from __future__ import annotations
|
||||
import argparse
|
||||
import json
|
||||
import logging
|
||||
import struct
|
||||
import sys
|
||||
from collections.abc import Generator
|
||||
from datetime import datetime
|
||||
from typing import Generator
|
||||
|
||||
import numpy as np
|
||||
from scipy import signal as scipy_signal
|
||||
|
||||
from .constants import (
|
||||
DISTRESS_NATURE_CODES,
|
||||
DSC_AUDIO_SAMPLE_RATE,
|
||||
DSC_BAUD_RATE,
|
||||
DSC_MARK_FREQ,
|
||||
DSC_SPACE_FREQ,
|
||||
DSC_AUDIO_SAMPLE_RATE,
|
||||
FORMAT_CODES,
|
||||
DISTRESS_NATURE_CODES,
|
||||
VALID_EOS,
|
||||
TELECOMMAND_FORMATS,
|
||||
MIN_SYMBOLS_FOR_FORMAT,
|
||||
TELECOMMAND_FORMATS,
|
||||
VALID_EOS,
|
||||
)
|
||||
|
||||
# Configure logging
|
||||
@@ -191,12 +190,11 @@ class DSCDecoder:
|
||||
self.bit_buffer = self.bit_buffer[-1500:]
|
||||
|
||||
# Look for dot pattern (sync) - alternating 1010101...
|
||||
if not self.in_message:
|
||||
if self._detect_dot_pattern():
|
||||
self.in_message = True
|
||||
self.message_bits = []
|
||||
logger.debug("DSC sync detected")
|
||||
return None
|
||||
if not self.in_message and self._detect_dot_pattern():
|
||||
self.in_message = True
|
||||
self.message_bits = []
|
||||
logger.debug("DSC sync detected")
|
||||
return None
|
||||
|
||||
# Collect message bits
|
||||
if self.in_message:
|
||||
|
||||
+5
-8
@@ -14,13 +14,13 @@ from datetime import datetime
|
||||
from typing import Any
|
||||
|
||||
from .constants import (
|
||||
FORMAT_CODES,
|
||||
DISTRESS_NATURE_CODES,
|
||||
TELECOMMAND_CODES,
|
||||
CATEGORY_PRIORITY,
|
||||
DISTRESS_NATURE_CODES,
|
||||
FORMAT_CODES,
|
||||
MID_COUNTRY_MAP,
|
||||
VALID_FORMAT_SPECIFIERS,
|
||||
TELECOMMAND_CODES,
|
||||
VALID_EOS,
|
||||
VALID_FORMAT_SPECIFIERS,
|
||||
)
|
||||
|
||||
logger = logging.getLogger('intercept.dsc.parser')
|
||||
@@ -330,10 +330,7 @@ def validate_mmsi(mmsi: str) -> bool:
|
||||
return False
|
||||
|
||||
# All zeros is invalid
|
||||
if mmsi == '000000000':
|
||||
return False
|
||||
|
||||
return True
|
||||
return mmsi != '000000000'
|
||||
|
||||
|
||||
def classify_mmsi(mmsi: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user