From 371f75a6b1a0e89b1995d80c218c9f04f65568b1 Mon Sep 17 00:00:00 2001 From: Nirvana Date: Sat, 17 Oct 2026 08:02:33 +0200 Subject: [PATCH] hrti: correct epg/catchup hours --- lib/streaming_providers/providers/hrti/catchup_manager.py | 5 +---- lib/streaming_providers/providers/hrti/epg_manager.py | 4 ++-- lib/streaming_providers/providers/hrti/provider.py | 6 ++---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/streaming_providers/providers/hrti/catchup_manager.py b/lib/streaming_providers/providers/hrti/catchup_manager.py index 6cc0484..ed0777c 100644 --- a/lib/streaming_providers/providers/hrti/catchup_manager.py +++ b/lib/streaming_providers/providers/hrti/catchup_manager.py @@ -74,9 +74,6 @@ def _wcf_date(epoch_seconds: int) -> str: class HRTiCatchupManager(CatchupManager): - #: v1 EPG window is 2 days back. VERIFY the real nPVR retention on a device - #: (oldest programme that still has a FileName) and adjust. - CATCHUP_HOURS = 48 def __init__( self, @@ -101,7 +98,7 @@ class HRTiCatchupManager(CatchupManager): # ------------------------------------------------------------------ @property def catchup_window_hours(self) -> int: - return self.CATCHUP_HOURS + return self._epg.PAST_DAYS * 24 # ------------------------------------------------------------------ # Resolution: (channel, start_time) -> programme + FileName diff --git a/lib/streaming_providers/providers/hrti/epg_manager.py b/lib/streaming_providers/providers/hrti/epg_manager.py index 3bb9a98..12cdfc0 100644 --- a/lib/streaming_providers/providers/hrti/epg_manager.py +++ b/lib/streaming_providers/providers/hrti/epg_manager.py @@ -52,8 +52,8 @@ class HRTiEpgManager(EpgManager): """Manages HRTi EPG operations (GetProgramme / GetEpgDetails).""" # EPG window (v1 values, kept): 2 days back, 7 days forward - PAST_DAYS = 2 - FUTURE_DAYS = 7 + PAST_DAYS = 3 # was 2 (72 h back) + FUTURE_DAYS = 2 # was 7 (48 h ahead) # referer the web client uses on both EPG endpoints (v1 used "/tv") EPG_REFERER_PATH = "/live/programme" diff --git a/lib/streaming_providers/providers/hrti/provider.py b/lib/streaming_providers/providers/hrti/provider.py index c3bef46..98b6bc6 100644 --- a/lib/streaming_providers/providers/hrti/provider.py +++ b/lib/streaming_providers/providers/hrti/provider.py @@ -8,10 +8,8 @@ content-id routing, manifest / DRM delegation, legacy surface) comes from ManagedProvider. Capabilities: live channels + radio, VOD, EPG (native batch GetProgramme, -per-programme GetEpgDetails enrichment; epg_window = (2, 7), v1 values -kept). A future catchup manager would take the EPG manager as a -keyword-only ``epg=`` extra (_init_managers builds epg before catchup, so -``self.epg`` is available in _build_catchup). +per-programme GetEpgDetails enrichment; epg_window = (3, 2). + """ from typing import ClassVar, Dict, List, Optional