Fix Twitter notification with self-hosted images (Fixes Tautulli/Tautulli-Issues#54)
This commit is contained in:
@@ -3434,6 +3434,10 @@ class TWITTER(Notifier):
|
|||||||
parameters = kwargs['parameters']
|
parameters = kwargs['parameters']
|
||||||
poster_url = parameters.get('poster_url','')
|
poster_url = parameters.get('poster_url','')
|
||||||
|
|
||||||
|
# Hack to add media type to attachment
|
||||||
|
if poster_url:
|
||||||
|
poster_url += '.png'
|
||||||
|
|
||||||
if self.config['incl_subject']:
|
if self.config['incl_subject']:
|
||||||
return self._send_tweet(subject + '\r\n' + body, attachment=poster_url)
|
return self._send_tweet(subject + '\r\n' + body, attachment=poster_url)
|
||||||
else:
|
else:
|
||||||
|
@@ -4020,7 +4020,7 @@ class WebInterface(object):
|
|||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def image(self, *args, **kwargs):
|
def image(self, *args, **kwargs):
|
||||||
if args:
|
if args:
|
||||||
img_hash = args[0]
|
img_hash = args[0].split('.')[0]
|
||||||
|
|
||||||
if img_hash in ('poster', 'cover', 'art'):
|
if img_hash in ('poster', 'cover', 'art'):
|
||||||
if img_hash == 'poster':
|
if img_hash == 'poster':
|
||||||
|
Reference in New Issue
Block a user