mirror of
https://github.com/anxdpanic/plugin.video.youtube.git
synced 2025-12-15 15:10:34 -08:00
Ignore player request failures that may incorrectly indicate a need to sign-in #1312
This commit is contained in:
parent
67df415e1b
commit
baa9ca2006
1 changed files with 14 additions and 3 deletions
|
|
@ -795,12 +795,14 @@ class YouTubePlayerClient(YouTubeDataClient):
|
|||
'country',
|
||||
'not available',
|
||||
)),
|
||||
'auth': frozenset((
|
||||
'not a bot',
|
||||
'please sign in',
|
||||
)),
|
||||
'reauth': frozenset((
|
||||
'confirm your age',
|
||||
'inappropriate',
|
||||
'member',
|
||||
'not a bot',
|
||||
'please sign in',
|
||||
)),
|
||||
'retry': frozenset((
|
||||
'try again later',
|
||||
|
|
@ -1801,7 +1803,16 @@ class YouTubePlayerClient(YouTubeDataClient):
|
|||
client=_client_name,
|
||||
has_auth=_has_auth)
|
||||
fail_reason = _reason.lower()
|
||||
if any(why in fail_reason for why in fail['reauth']):
|
||||
if any(why in fail_reason for why in fail['auth']):
|
||||
if _has_auth:
|
||||
restart = False
|
||||
elif restart is None and logged_in:
|
||||
client_data['_auth_requested'] = True
|
||||
restart = True
|
||||
else:
|
||||
continue
|
||||
break
|
||||
elif any(why in fail_reason for why in fail['reauth']):
|
||||
if _client.get('_auth_required') == 'ignore_fail':
|
||||
continue
|
||||
elif client_data.get('_auth_required'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue