mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-30 11:38:36 -07:00
Include posters in Twitter notifications
* Also cleanup Facebook
This commit is contained in:
parent
6f33d29a51
commit
acc18b8d68
25 changed files with 6970 additions and 4745 deletions
17
lib/requests_oauthlib/compliance_fixes/weibo.py
Normal file
17
lib/requests_oauthlib/compliance_fixes/weibo.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
from json import loads, dumps
|
||||
|
||||
from oauthlib.common import to_unicode
|
||||
|
||||
|
||||
def weibo_compliance_fix(session):
|
||||
|
||||
def _missing_token_type(r):
|
||||
token = loads(r.text)
|
||||
token['token_type'] = 'Bearer'
|
||||
r._content = to_unicode(dumps(token)).encode('UTF-8')
|
||||
return r
|
||||
|
||||
session._client.default_token_placement = 'query'
|
||||
session.register_compliance_hook('access_token_response',
|
||||
_missing_token_type)
|
||||
return session
|
Loading…
Add table
Add a link
Reference in a new issue