mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Use default poster for Facebook if unable to upload poster
This commit is contained in:
parent
afed5841e7
commit
2259a96058
1 changed files with 73 additions and 66 deletions
|
@ -2169,9 +2169,16 @@ class FacebookNotifier(object):
|
|||
if self.incl_poster and 'metadata' in kwargs:
|
||||
metadata = kwargs['metadata']
|
||||
poster_url = metadata.get('poster_url','')
|
||||
poster_link = ''
|
||||
caption = ''
|
||||
|
||||
if poster_url:
|
||||
# Use default posters if no poster_url
|
||||
if not poster_url:
|
||||
if metadata['media_type'] in ['artist', 'track']:
|
||||
poster_url = 'https://raw.githubusercontent.com/drzoidberg33/plexpy/master/data/interfaces/default/images/cover.png'
|
||||
else:
|
||||
poster_url = 'https://raw.githubusercontent.com/drzoidberg33/plexpy/master/data/interfaces/default/images/poster.png'
|
||||
|
||||
if metadata['media_type'] == 'movie':
|
||||
title = '%s (%s)' % (metadata['title'], metadata['year'])
|
||||
subtitle = metadata['summary']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue