def plugin_process_playdata(playdata): CDMHEADERS = {} if check_key(playdata, 'license') and check_key( playdata['license'], 'drmConfig') and check_key( playdata['license']['drmConfig'], 'widevine'): if 'nlznl.solocoo.tv' in playdata['license']['drmConfig']['widevine'][ 'drmServerUrl']: if xbmc.Monitor().waitForAbort(1): return False if check_key(playdata['license']['drmConfig']['widevine'], 'customHeaders'): for row in playdata['license']['drmConfig']['widevine'][ 'customHeaders']: CDMHEADERS[row] = playdata['license']['drmConfig']['widevine'][ 'customHeaders'][row] item_inputstream = inputstream.Widevine( license_key=playdata['license']['drmConfig']['widevine'] ['drmServerUrl'], ) else: item_inputstream = inputstream.MPD() return item_inputstream, CDMHEADERS
def plugin_process_playdata(playdata): profile_settings = load_profile(profile_id=1) CDMHEADERS = { 'User-Agent': DEFAULT_USER_AGENT, 'X_CSRFToken': profile_settings['csrf_token'], 'Cookie': playdata['license']['cookie'], } if check_key(playdata, 'license') and check_key( playdata['license'], 'triggers') and check_key( playdata['license']['triggers'][0], 'licenseURL'): item_inputstream = inputstream.Widevine( license_key=playdata['license']['triggers'][0]['licenseURL'], #manifest_update_parameter = 'update', ) if check_key(playdata['license']['triggers'][0], 'customData'): CDMHEADERS['AcquireLicense.CustomData'] = playdata['license'][ 'triggers'][0]['customData'] CDMHEADERS['CADeviceType'] = 'Widevine OTT client' else: item_inputstream = inputstream.MPD( #manifest_update_parameter = 'update', ) return item_inputstream, CDMHEADERS
def plugin_process_playdata(playdata): CDMHEADERS = CONST_BASE_HEADERS CDMHEADERS['User-Agent'] = DEFAULT_USER_AGENT if check_key(playdata, 'license'): item_inputstream = inputstream.Widevine( license_key=playdata['license'], ) else: item_inputstream = inputstream.MPD() return item_inputstream, CDMHEADERS
def plugin_process_playdata(playdata): profile_settings = load_profile(profile_id=1) CDMHEADERS = { 'User-Agent': DEFAULT_USER_AGENT, } if check_key(playdata, 'license') and check_key(playdata['license'], 'widevine') and check_key(playdata['license']['widevine'], 'license'): item_inputstream = inputstream.Widevine( license_key = playdata['license']['widevine']['license'], ) else: item_inputstream = inputstream.MPD() return item_inputstream, CDMHEADERS
def plugin_process_playdata(playdata): profile_settings = load_profile(profile_id=1) CDMHEADERS = { 'User-Agent': DEFAULT_USER_AGENT, } if check_key(playdata, 'license') and len( str(profile_settings['ticket_id'])) == 0: CDMHEADERS['Authorization'] = 'Bearer ' + profile_settings['token'] item_inputstream = inputstream.Widevine( license_key=playdata['license'], ) elif check_key(playdata, 'license') and check_key( playdata['license'], 'widevine') and check_key( playdata['license']['widevine'], 'license'): item_inputstream = inputstream.Widevine( license_key=playdata['license']['widevine']['license'], ) else: item_inputstream = inputstream.MPD() return item_inputstream, CDMHEADERS