Skip to content

Commit

Permalink
Remove Duplicate Emails
Browse files Browse the repository at this point in the history
Converts the email list to a set to remove any duplicates.
  • Loading branch information
jakewaldron committed Jun 10, 2016
1 parent 3998326 commit 896eacc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ The config file is in the scripts folder. Before first run of the script, pleas
* upload_cloudinary_cloud_name - Cloudinary cloud name
* upload_cloudinary_api_key - Cloudinary api key
* upload_cloudinary_api_secret - Cloudinary api secret
* upload_cloudinary_use_https - True to use https and False to use http for both uploading url and image locations in the email/web page

#####Email
* email_enabled - Enable the creation and sending of an email
Expand Down
3 changes: 3 additions & 0 deletions scripts/plexEmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,9 @@ def createWebHTML():
sharedEmails = getSharedUserEmails()
config['email_to'].extend(x for x in sharedEmails if x not in config['email_to'])

#Remove duplicates by converting to a set
config['email_to'] = set(config['email_to'])

emailCount = 0
if (testMode):
success = sendMail([config['email_from']])
Expand Down

0 comments on commit 896eacc

Please sign in to comment.