Skip to content

Commit

Permalink
Fix API requests failing if not logged in
Browse files Browse the repository at this point in the history
- Regression from c0c09d6
  • Loading branch information
MoojMidge committed Aug 4, 2024
1 parent fe9f480 commit 5ed7739
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/lib/youtube_plugin/youtube/client/request_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class YouTubeRequestClient(BaseRequestsClass):
'Authorization': 'Bearer {_access_token}',
},
'params': {
'key': None,
'key': ValueError,
'prettyPrint': 'false'
},
},
Expand Down Expand Up @@ -360,7 +360,7 @@ def build_client(cls, client_name=None, data=None):
else:
if 'Authorization' in client['headers']:
del client['headers']['Authorization']
if 'key' in params and not params['key']:
if 'key' in params and params['key'] is ValueError:
del params['key']
except KeyError:
pass
Expand Down
1 change: 1 addition & 0 deletions resources/lib/youtube_plugin/youtube/client/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class YouTube(LoginClient):
' Chrome/80.0.3987.162 Mobile Safari/537.36'),
},
'params': {
'key': None,
'prettyPrint': 'false'
},
},
Expand Down

0 comments on commit 5ed7739

Please sign in to comment.