Skip to content

Commit 4c7c7b7

Browse files
oliv3rclaude
andcommitted
Fixed: Skip DRM warning when Widevine playback is available
The DRM warning dialog is unnecessary when inputstreamhelper confirms that InputStream Adaptive and the Widevine CDM are installed. Fall through to the existing warning if the helper is unavailable. This effectively makes the show_drm_paid_warning setting a no-op when Widevine is present. A future refactor could replace the setting entirely with a pop-up only when Widevine is not detected. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
1 parent 0c4178c commit 4c7c7b7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

resources/lib/actions/videoaction.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ def __show_warnings(self, media_item):
123123

124124
if (media_item.isDrmProtected or media_item.isPaid) and AddonSettings.show_drm_paid_warning():
125125
if media_item.isDrmProtected:
126+
try:
127+
import inputstreamhelper
128+
is_helper = inputstreamhelper.Helper("mpd", drm="com.widevine.alpha")
129+
if is_helper.check_inputstream():
130+
Logger.debug("Widevine available, skipping DRM warning regardless of setting")
131+
return
132+
except Exception:
133+
pass
126134
Logger.debug("Showing DRM Warning message")
127135
title = LanguageHelper.get_localized_string(LanguageHelper.DrmTitle)
128136
message = LanguageHelper.get_localized_string(LanguageHelper.DrmText)

0 commit comments

Comments
 (0)