mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Merge v2.0.28 into v2-newsletters
This commit is contained in:
commit
5ef8947532
20 changed files with 171 additions and 67 deletions
|
@ -3321,10 +3321,17 @@ class TELEGRAM(Notifier):
|
|||
if poster_content:
|
||||
poster_filename = 'poster_{}.png'.format(pretty_metadata.parameters['rating_key'])
|
||||
files = {'photo': (poster_filename, poster_content, 'image/png')}
|
||||
data['caption'] = text
|
||||
|
||||
return self.make_request('https://api.telegram.org/bot{}/sendPhoto'.format(self.config['bot_token']),
|
||||
data=data, files=files)
|
||||
if len(text) > 200:
|
||||
data['disable_notification'] = True
|
||||
else:
|
||||
data['caption'] = text
|
||||
|
||||
r = self.make_request('https://api.telegram.org/bot{}/sendPhoto'.format(self.config['bot_token']),
|
||||
data=data, files=files)
|
||||
|
||||
if not data.pop('disable_notification', None):
|
||||
return r
|
||||
|
||||
data['text'] = text
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue