mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -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
18
lib/requests_oauthlib/compliance_fixes/douban.py
Normal file
18
lib/requests_oauthlib/compliance_fixes/douban.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import json
|
||||
|
||||
from oauthlib.common import to_unicode
|
||||
|
||||
|
||||
def douban_compliance_fix(session):
|
||||
|
||||
def fix_token_type(r):
|
||||
token = json.loads(r.text)
|
||||
token.setdefault('token_type', 'Bearer')
|
||||
fixed_token = json.dumps(token)
|
||||
r._content = to_unicode(fixed_token).encode('utf-8')
|
||||
return r
|
||||
|
||||
session._client_default_token_placement = 'query'
|
||||
session.register_compliance_hook('access_token_response', fix_token_type)
|
||||
|
||||
return session
|
Loading…
Add table
Add a link
Reference in a new issue