mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-09-22 17:12:16 +02:00
Prepare RTLPlus for new streaming prov
This commit is contained in:
@@ -323,6 +323,8 @@ class DRMPluginManager:
|
||||
logger.debug("Phase 2: No DRM configs to process")
|
||||
return []
|
||||
|
||||
drm_configs = sorted(drm_configs, key=lambda c: c.priority)
|
||||
|
||||
# Get system-specific plugins only (exclude GENERIC)
|
||||
from typing import Any
|
||||
system_plugins: dict[DRMSystem, Any] = {
|
||||
|
||||
@@ -469,10 +469,34 @@ class DRMOperations:
|
||||
# out to be only partial.
|
||||
# ------------------------------------------------------------------
|
||||
provider_configs_snapshot = list(provider_drm_configs)
|
||||
processed = self.drm_plugin_manager.process_system_specific_plugins(
|
||||
provider_drm_configs, pssh_data_list if pssh_data_list else [], **kwargs
|
||||
sorted_systems = sorted(
|
||||
{c.system for c in provider_drm_configs},
|
||||
key=lambda s: min(c.priority for c in provider_drm_configs if c.system == s)
|
||||
)
|
||||
|
||||
remaining = list(provider_drm_configs)
|
||||
|
||||
for drm_system in sorted_systems:
|
||||
system_configs = [c for c in remaining if c.system == drm_system]
|
||||
if not system_configs:
|
||||
continue
|
||||
|
||||
batch_result = self.drm_plugin_manager.process_system_specific_plugins(
|
||||
system_configs, pssh_data_list or [], **kwargs
|
||||
)
|
||||
|
||||
# Replace this system's configs with plugin output
|
||||
remaining = [c for c in remaining if c.system != drm_system] + batch_result
|
||||
|
||||
# Check coverage after each system
|
||||
if pssh_data_list and any(c.system == DRMSystem.CLEARKEY for c in remaining):
|
||||
remaining, has_full_coverage = self._check_clearkey_coverage(remaining, pssh_data_list)
|
||||
if has_full_coverage:
|
||||
logger.info(f"Full ClearKey coverage after {drm_system.value} — stopping early")
|
||||
break
|
||||
|
||||
processed = remaining
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Step 6: Merge Phase 1 partial ClearKey result (if any) with Phase 2
|
||||
# output. Phase 1 configs whose DRM system is not already represented
|
||||
|
||||
Reference in New Issue
Block a user