mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-11 19:45:06 +00:00
fix(dash): treat a missing FFprobe as no PSSH instead of crashing
PSSH discovery raised OSError when the binary was absent, so a DRM free download failed on any host without FFprobe.
This commit is contained in:
@@ -22,6 +22,7 @@ from pywidevine.cdm import Cdm as WidevineCdm
|
||||
from pywidevine.pssh import PSSH
|
||||
from requests import Session
|
||||
|
||||
from unshackle.core import binaries
|
||||
from unshackle.core.config import config
|
||||
from unshackle.core.constants import DOWNLOAD_CANCELLED, DOWNLOAD_LICENCE_ONLY, AnyTrack
|
||||
from unshackle.core.drm import DRM_T, ClearKeyCENC, PlayReady, Widevine
|
||||
@@ -414,7 +415,9 @@ class DASH:
|
||||
track.data["dash"]["timescale"] = int(segment_timescale)
|
||||
track.data["dash"]["segment_durations"] = segment_durations
|
||||
|
||||
if not track.drm and init_data and isinstance(track, (Video, Audio)):
|
||||
if not track.drm and init_data and isinstance(track, (Video, Audio)) and not binaries.FFProbe:
|
||||
log.warning("FFprobe was not found, so the init segment was not probed for a PSSH.")
|
||||
elif not track.drm and init_data and isinstance(track, (Video, Audio)):
|
||||
prefers_playready = track.prefers_playready(cdm)
|
||||
if prefers_playready:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user