mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-09-16 22:22:27 +02:00
Add m3u playlists
This commit is contained in:
@@ -269,8 +269,10 @@ class PSSHParser:
|
||||
|
||||
pos += length
|
||||
|
||||
except (struct.error, IndexError, ValueError):
|
||||
# Silently handle protobuf parsing errors
|
||||
except (struct.error, IndexError, ValueError) as e:
|
||||
# Log protobuf parsing errors for debugging
|
||||
import logging
|
||||
logging.debug(f"Widevine protobuf parsing failed: {type(e).__name__}: {e}")
|
||||
return []
|
||||
|
||||
return key_ids
|
||||
|
||||
@@ -117,9 +117,14 @@ class MP4PSSHExtractor:
|
||||
for pssh_data in pssh_data_list:
|
||||
if pssh_data.needs_tenc_fallback() and tenc_kids:
|
||||
logger.debug(
|
||||
f"Adding {len(tenc_kids)} tenc KIDs to {pssh_data.drm_system} PSSH"
|
||||
f"Adding {len(tenc_kids)} tenc KIDs to {pssh_data.drm_system} PSSH (fallback)"
|
||||
)
|
||||
pssh_data.add_key_ids(tenc_kids)
|
||||
elif pssh_data.key_ids and tenc_kids:
|
||||
# PSSH already has KIDs - tenc not needed
|
||||
logger.debug(
|
||||
f"PSSH already has {len(pssh_data.key_ids)} KIDs from payload - skipping tenc fallback"
|
||||
)
|
||||
|
||||
return pssh_data_list
|
||||
|
||||
@@ -454,13 +459,21 @@ class MP4PSSHExtractor:
|
||||
source="mp4_segment",
|
||||
)
|
||||
|
||||
# Log what we found
|
||||
# Log what we found with source information
|
||||
drm_name = pssh_data.drm_system.name if pssh_data.drm_system else "UNKNOWN"
|
||||
kid_count = len(pssh_data.key_ids)
|
||||
version = metadata["version"]
|
||||
|
||||
# Determine source of KIDs
|
||||
if version > 0 and kid_count > 0:
|
||||
source = "v1+ header"
|
||||
elif version == 0 and kid_count > 0:
|
||||
source = "v0 payload"
|
||||
else:
|
||||
source = "none (will need tenc)"
|
||||
|
||||
logger.debug(
|
||||
f"Parsed PSSH: {drm_name} v{version} with {kid_count} KIDs"
|
||||
f"Parsed PSSH: {drm_name} v{version} with {kid_count} KIDs from {source}"
|
||||
)
|
||||
|
||||
return pssh_data
|
||||
|
||||
Reference in New Issue
Block a user