Skip to content

Commit

Permalink
Merge pull request #44 from jakewaldron/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jakewaldron authored Aug 16, 2016
2 parents e8320af + 980d822 commit de8c8b4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/plexEmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,12 +1320,13 @@ def exceptionHandler(type, value, tb):
pwLink = ''

emailText += '<table><tr width="100%">'
if (config['filter_show_email_images']):
if (config['filter_show_email_images'] and len(imageInfo) != 0):
emailText += '<td width="200"><a target="_blank" href="' + pwLink + '"><img class="featurette-image img-responsive pull-left" src="' + imageInfo['emailImgPath'].decode('utf-8') +'" width="154"></a></td>'
emailText += '<td><h2 class="featurette-heading"><a target="_blank" style="color: #000000;" href="' + pwLink + '">' + showTitle.decode('utf-8') + '</a></h2>'
emailText += '<p class="lead"><i>S' + str(tvEpisodes[episode]['season_index']) + ' E' + str(tvEpisodes[episode]['index']) + ': ' + title.decode('utf-8') + '</i></p>'
htmlText += '<div class="featurette" id="shows">'
htmlText += '<a target="_blank" href="' + pwLink + '"><img class="featurette-image img-responsive pull-left" src="' + imageInfo['webImgPath'].decode('utf-8') + '" width="154px" height="218px"></a>'
if (len(imageInfo) != 0):
htmlText += '<a target="_blank" href="' + pwLink + '"><img class="featurette-image img-responsive pull-left" src="' + imageInfo['webImgPath'].decode('utf-8') + '" width="154px" height="218px"></a>'
htmlText += '<div style="margin-left: 200px;"><h2 class="featurette-heading"><a target="_blank" style="color: #000000;" href="' + pwLink + '">' + showTitle.decode('utf-8') + '</a></h2>'
htmlText += '<p class="lead"><i>S' + str(tvEpisodes[episode]['season_index']) + ' E' + str(tvEpisodes[episode]['index']) + ': ' + title.decode('utf-8') + '</i></p>'

Expand Down Expand Up @@ -1676,4 +1677,4 @@ def exceptionHandler(type, value, tb):
elif (not config['email_enabled']):
print 'Emails were not sent because the option is disabled in the config file.'
else:
print 'Emails were not sent because there were no new additions in the timeframe specified.'
print 'Emails were not sent because there were no new additions in the timeframe specified.'

0 comments on commit de8c8b4

Please sign in to comment.