Skip to content

Commit de8c8b4

Browse files
authored
Merge pull request #44 from jakewaldron/dev
Dev
2 parents e8320af + 980d822 commit de8c8b4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/plexEmail.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,12 +1320,13 @@ def exceptionHandler(type, value, tb):
13201320
pwLink = ''
13211321

13221322
emailText += '<table><tr width="100%">'
1323-
if (config['filter_show_email_images']):
1323+
if (config['filter_show_email_images'] and len(imageInfo) != 0):
13241324
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>'
13251325
emailText += '<td><h2 class="featurette-heading"><a target="_blank" style="color: #000000;" href="' + pwLink + '">' + showTitle.decode('utf-8') + '</a></h2>'
13261326
emailText += '<p class="lead"><i>S' + str(tvEpisodes[episode]['season_index']) + ' E' + str(tvEpisodes[episode]['index']) + ': ' + title.decode('utf-8') + '</i></p>'
13271327
htmlText += '<div class="featurette" id="shows">'
1328-
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>'
1328+
if (len(imageInfo) != 0):
1329+
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>'
13291330
htmlText += '<div style="margin-left: 200px;"><h2 class="featurette-heading"><a target="_blank" style="color: #000000;" href="' + pwLink + '">' + showTitle.decode('utf-8') + '</a></h2>'
13301331
htmlText += '<p class="lead"><i>S' + str(tvEpisodes[episode]['season_index']) + ' E' + str(tvEpisodes[episode]['index']) + ': ' + title.decode('utf-8') + '</i></p>'
13311332

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

0 commit comments

Comments
 (0)