mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Encode poster title to UTF-8 for Imgur upload
This commit is contained in:
parent
8b27c7e01a
commit
5bed46c0aa
1 changed files with 2 additions and 2 deletions
|
@ -543,8 +543,8 @@ def uploadToImgur(imgPath, imgTitle=''):
|
|||
data = {'type': 'base64',
|
||||
'image': base64.b64encode(img)}
|
||||
if imgTitle:
|
||||
data['title'] = imgTitle
|
||||
data['name'] = imgTitle + '.jpg'
|
||||
data['title'] = imgTitle.encode('utf-8')
|
||||
data['name'] = imgTitle.encode('utf-8') + '.jpg'
|
||||
|
||||
try:
|
||||
request = urllib2.Request('https://api.imgur.com/3/image', headers=headers, data=urllib.urlencode(data))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue