-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from flubshi/matrix_check_requirements
Settings: Add check to verify requirements (widevine and network status) Bump version to 1.0.3
- Loading branch information
Showing
5 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import xbmc | ||
import xbmcgui | ||
import inputstreamhelper | ||
import requests | ||
import json | ||
|
||
|
||
def getStatus(): | ||
url = "https://status.wpstr.tv/status?nw=wifi" | ||
r = requests.get(url) | ||
return r.json() | ||
|
||
is_helper = inputstreamhelper.Helper('mpd', drm='com.widevine.alpha') | ||
if is_helper.check_inputstream(): | ||
# widevine installed; | ||
xbmc.log("[pvr.waipu] widevine: installed", level=xbmc.LOGDEBUG) | ||
widevine_status = "OK - Widevine found." | ||
else: | ||
# widevine not installed; notify user | ||
xbmc.log("[pvr.waipu] widevine: not installed", level=xbmc.LOGDEBUG) | ||
widevine_status = "Error - Not found!" | ||
|
||
network_status_arr = getStatus() | ||
network_status = network_status_arr["statusText"] | ||
|
||
xbmcgui.Dialog().ok("pvr.waipu - Requirements", "[B]Widevine:[/B] " + widevine_status, "", "[B]Network status:[/B] " + network_status) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters