diff --git a/scripts/plexEmail.py b/scripts/plexEmail.py index 421bdba..05121b4 100644 --- a/scripts/plexEmail.py +++ b/scripts/plexEmail.py @@ -116,6 +116,15 @@ def processImage(imageHash, thumb, mediaType, seasonIndex, episodeIndex): thumb = thumb[7:len(thumb)] imgName = thumb[thumb.rindex('/') + 1:thumb.rindex('.')] + hash imgLocation = config['plex_data_folder'] + 'Plex Media Server' + os.path.sep + 'Media' + os.path.sep + 'localhost' + os.path.sep + '' + thumb + elif (thumb.find('upload://') >= 0): + thumb = thumb[9:len(thumb)] + category = thumb[0:thumb.index('/')] + imgName = thumb[thumb.rindex('/') + 1:len(thumb)] + if (mediaType == 'movie'): + type = "Movies" + else: + type = "TV Shows" + imgLocation = config['plex_data_folder'] + 'Plex Media Server' + os.path.sep + 'Metadata' + os.path.sep + type + os.path.sep + imageHash[0] + os.path.sep + imageHash[1:len(imageHash)] + '.bundle' + os.path.sep + 'Uploads' + os.path.sep + category + os.path.sep + imgName else: thumb = thumb[11:len(thumb)] category = thumb[0:thumb.index('/')] @@ -775,7 +784,7 @@ def createWebHTML(): emailTVEpisodes += '
' emailTVEpisodes += ' | ' + showTitle.decode('utf-8') + '' - emailTVEpisodes += 'S' + str(tvEpisodes[episode]['season_index']) + ' E' + str(tvEpisodes[episode]['index']) + ': ' + title + ' ' + emailTVEpisodes += 'S' + str(tvEpisodes[episode]['season_index']) + ' E' + str(tvEpisodes[episode]['index']) + ': ' + title.decode('utf-8') + ' ' if (tvEpisodes[episode]['tagline'] != ''): emailTVEpisodes += '' + tvEpisodes[episode]['tagline'].decode('utf-8') + ' ' emailTVEpisodes += '' + tvEpisodes[episode]['summary'].decode('utf-8') + ' ' @@ -786,7 +795,7 @@ def createWebHTML(): htmlTVEpisodes += ''
htmlTVEpisodes += ''
htmlTVEpisodes += ' ' + showTitle.decode('utf-8') + '' - htmlTVEpisodes += 'S' + str(tvEpisodes[episode]['season_index']) + ' E' + str(tvEpisodes[episode]['index']) + ': ' + title + ' ' + htmlTVEpisodes += 'S' + str(tvEpisodes[episode]['season_index']) + ' E' + str(tvEpisodes[episode]['index']) + ': ' + title.decode('utf-8') + ' ' if (tvEpisodes[episode]['tagline'] != ''): htmlTVEpisodes += '' + tvEpisodes[episode]['tagline'].decode('utf-8') + ' ' htmlTVEpisodes += '' + tvEpisodes[episode]['summary'].decode('utf-8') + ' ' |