mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-09-19 07:32:37 +02:00
catchup window from channels
This commit is contained in:
@@ -60,6 +60,7 @@ class CatchupOperations:
|
||||
end_time: int,
|
||||
epg_id: Optional[str] = None,
|
||||
country: Optional[str] = None,
|
||||
drm_variant: Optional[str] = None,
|
||||
) -> List:
|
||||
"""Get DRM configs for catchup content."""
|
||||
provider = self.registry.get_provider(provider_name)
|
||||
@@ -78,6 +79,7 @@ class CatchupOperations:
|
||||
end_time=end_time,
|
||||
epg_id=epg_id,
|
||||
country=country,
|
||||
drm_variant=drm_variant,
|
||||
)
|
||||
except NotImplementedError:
|
||||
return self.drm_operations.get_channel_drm_configs(
|
||||
|
||||
@@ -207,9 +207,10 @@ class ProviderManager:
|
||||
end_time: int,
|
||||
epg_id: Optional[str] = None,
|
||||
country: Optional[str] = None,
|
||||
drm_variant: Optional[str] = None,
|
||||
) -> List:
|
||||
return self.catchup_ops.get_catchup_drm_configs(
|
||||
provider_name, channel_id, start_time, end_time, epg_id, country
|
||||
provider_name, channel_id, start_time, end_time, epg_id, country, drm_variant=drm_variant
|
||||
)
|
||||
|
||||
def get_catchup_window(self, provider_name: str, channel_id: Optional[str] = None) -> int:
|
||||
|
||||
@@ -241,8 +241,14 @@ class StreamingProvider(ABC):
|
||||
"""
|
||||
return []
|
||||
|
||||
def get_drm(self, content_id: str, **kwargs) -> List[DRMConfig]:
|
||||
"""Get all DRM configurations for a channel by ID"""
|
||||
def get_drm(self, content_id: str, drm_variant: Optional[str] = None, **kwargs) -> List[DRMConfig]:
|
||||
"""Get all DRM configurations for a channel by ID
|
||||
|
||||
Args:
|
||||
content_id: Content identifier
|
||||
drm_variant: Optional DRM variant (e.g., 'auto', 'software')
|
||||
**kwargs: Additional provider-specific parameters
|
||||
"""
|
||||
return []
|
||||
|
||||
@property
|
||||
@@ -1219,6 +1225,7 @@ class StreamingProvider(ABC):
|
||||
start_time: int,
|
||||
end_time: int,
|
||||
epg_id: Optional[str] = None,
|
||||
drm_variant: Optional[str] = None,
|
||||
**kwargs,
|
||||
) -> List[DRMConfig]:
|
||||
"""
|
||||
@@ -1239,13 +1246,13 @@ class StreamingProvider(ABC):
|
||||
"""
|
||||
if not self.supports_catchup:
|
||||
logger.debug(f"{self.provider_name}: Catchup not supported, falling back to live DRM")
|
||||
return self.get_drm(content_id, **kwargs)
|
||||
return self.get_drm(content_id, drm_variant=drm_variant, **kwargs)
|
||||
|
||||
logger.debug(
|
||||
f"{self.provider_name}: get_catchup_drm not implemented, "
|
||||
f"using live DRM configuration"
|
||||
)
|
||||
return self.get_drm(content_id, **kwargs)
|
||||
return self.get_drm(content_id, drm_variant=drm_variant, **kwargs)
|
||||
|
||||
# ============================================================================
|
||||
# CATCHUP HELPER METHODS
|
||||
|
||||
Reference in New Issue
Block a user