Merge pull request #448 from anxdpanic/nexus

7.0.2~alpha3
This commit is contained in:
anxdpanic 2023-04-22 13:06:23 -04:00 committed by GitHub
commit f97ffbeba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.youtube" name="YouTube" version="7.0.2~alpha2" provider-name="anxdpanic, bromix">
<addon id="plugin.video.youtube" name="YouTube" version="7.0.2~alpha3" provider-name="anxdpanic, bromix">
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="script.module.requests" version="2.12.4"/>

View file

@ -752,7 +752,7 @@ class VideoInfo(object):
}
player_response = {}
for attempt in range(4):
for attempt in range(2):
try:
r = requests.post(video_info_url, params=params, json=payload,
headers=headers, verify=self._verify, cookies=None,
@ -764,11 +764,6 @@ class VideoInfo(object):
if attempt == 0:
payload['context']['client']['clientName'] = 'ANDROID_EMBEDDED_PLAYER'
continue
if attempt == 1:
payload['context']['client']['clientName'] = 'ANDROID'
del headers['Authorization']
if attempt == 2:
payload['context']['client']['clientName'] = 'ANDROID_EMBEDDED_PLAYER'
except:
error_message = 'Failed to get player response for video_id "%s"' % video_id
self._context.log_error(error_message + '\n' + traceback.format_exc())