PlexEmail - Email Recently Added Media

I'm not sure if I'm doing something wrong or if it's stuck or if there's been an error and it hasn't shown yet.

When I run the script, it was saying...

Web page created successfully

Failed to send email

so I edited the email settings (I'm using gmail)

and now it only says "web page created successfully" it doesn't complete or show an error. I also don't get the email and can't try the script again without closing command prompt and relaunching..

Using Windows 8.1 and PlexEmail 5.2

*****Update*****

It finally came back as failed

For gmail you might need to allow for less secure apps: https://support.google.com/accounts/answer/6010255?hl=en

To get the actual failure, try this script: plexEmail.zip (9.07 KB)

EDIT: Your settings look good to me, I'm guessing it's the less secure app thing.

Is there something wrong with my email settings?

##Email
email_enabled = True
email_individually = False
# ['email1@gmail.com', 'email2@hotmail.com']
email_to = ['email@gmail.com']
email_from = 'email@gmail.com'
email_from_name = 'SKYNET'
email_smtp_address = 'smtp.gmail.com'
email_smtp_port = 465
email_username = 'email@gmail.com'
email_password = 'password'
# Only valid if web_enabled = True and upload_use_cloudinary = False
email_use_web_images = True
email_skip_if_no_additions = False

Actually it might be an issue with using the SSL port instead of 587.  I'll have to look at what is needed to support SSL.

v0.5.3 Released

 

New Feature and Bug Fix

  • Now support SSL for email
  • filter_include_plex_web_link actually works now if set to False

New relevant field: email_use_ssl - Default: False - Note: If this is True, the port must be an SSL port for it to work.

https://github.com/jakewaldron/PlexEmail/releases/latest

v0.5.4 Released

Bug Fixes

  • Using filter_libraries was breaking the script due to an updated sql statement
  • Using multiple libraries in filter_libraries was causing neither to actually be filtered.

Latest: https://github.com/jakewaldron/PlexEmail/releases/latest

Would it be possible add a sort option to sort by when things were added? 

Would it be possible add a sort option to sort by when things were added? 

You can currently do this by using the field "id" and reverse = False.  This will sort from oldest to newest.

You can currently do this by using the field "id" and reverse = False.  This will sort from oldest to newest.

Oh cool, didn't realize that. Thanks :)

I just installed this on OS X Yosemite 10.10.3, and everything works well except for the images. All of the images pull back as just the same image, so for example say in the past week I've added 5 movies, one of them being Interstellar.  All of the images show the picture for Interstellar, but the rest of the information is correct.

I just installed this on OS X Yosemite 10.10.3, and everything works well except for the images. All of the images pull back as just the same image, so for example say in the past week I've added 5 movies, one of them being Interstellar.  All of the images show the picture for Interstellar, but the rest of the information is correct.


Could you give me the values for these:

web_enabled
email_use_web_images
upload_use_cloudinary

Sure thing.

web_enabled = True

email_use_web_images = True

upload_use_cloudinary = False

Sure thing.

web_enabled = True

email_use_web_images = True

upload_use_cloudinary = False

Can you run this modified script please and give me the output?  It will just print out the info we are getting from the db and then the path that will be used in the email/web page to help me troubleshoot where in the script might be breaking or if it is something else.

Thanks!

plexEmail.zip (9.07 KB)

Here you go. Domain name changed to protect the innocent. 

[timstephens24 ~/repos/PlexEmail/scripts] python plexEmail2.py 
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg'}
Web page created successfully
Successfully sent 1 email(s)

Here you go. Domain name changed to protect the innocent. 

[timstephens24 ~/repos/PlexEmail/scripts] python plexEmail2.py 
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f.jpg'}
Web page created successfully
Successfully sent 1 email(s)

Thanks.  It looks like it might be an issue with local media.  Here is another script that might fix the issue (also adds another piece of logging if it doesn't work).

plexEmail.zip (9.07 KB)

That worked. Email/Web site looks perfect now.

[timstephens24 ~/repos/PlexEmail/scripts] python plexEmail2.py 
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
92206304aa517b8756d458b05f3ffaebda9d044f_16e36d4c5eed87dd3dd365f3dd891a6fc37ab04f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f_16e36d4c5eed87dd3dd365f3dd891a6fc37ab04f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f_16e36d4c5eed87dd3dd365f3dd891a6fc37ab04f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
92206304aa517b8756d458b05f3ffaebda9d044f_42ac0af24d2c11c3ab345fab43b3ec2feca5d88f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f_42ac0af24d2c11c3ab345fab43b3ec2feca5d88f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f_42ac0af24d2c11c3ab345fab43b3ec2feca5d88f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
92206304aa517b8756d458b05f3ffaebda9d044f_5acf9cc47e780cafcc5e1a798c48a14b8d224532
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f_5acf9cc47e780cafcc5e1a798c48a14b8d224532.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f_5acf9cc47e780cafcc5e1a798c48a14b8d224532.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
92206304aa517b8756d458b05f3ffaebda9d044f_1c73e9ffeca12b8125bfe818bdc8d43ca356f3f3
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f_1c73e9ffeca12b8125bfe818bdc8d43ca356f3f3.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f_1c73e9ffeca12b8125bfe818bdc8d43ca356f3f3.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
92206304aa517b8756d458b05f3ffaebda9d044f_5f059368b73d0074294d0cdadc1020aa01931a24
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f_5f059368b73d0074294d0cdadc1020aa01931a24.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f_5f059368b73d0074294d0cdadc1020aa01931a24.jpg'}
Web page created successfully
Successfully sent 1 email(s)
 

That worked. Email/Web site looks perfect now.

[timstephens24 ~/repos/PlexEmail/scripts] python plexEmail2.py 
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
92206304aa517b8756d458b05f3ffaebda9d044f_16e36d4c5eed87dd3dd365f3dd891a6fc37ab04f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f_16e36d4c5eed87dd3dd365f3dd891a6fc37ab04f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f_16e36d4c5eed87dd3dd365f3dd891a6fc37ab04f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
92206304aa517b8756d458b05f3ffaebda9d044f_42ac0af24d2c11c3ab345fab43b3ec2feca5d88f
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f_42ac0af24d2c11c3ab345fab43b3ec2feca5d88f.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f_42ac0af24d2c11c3ab345fab43b3ec2feca5d88f.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
92206304aa517b8756d458b05f3ffaebda9d044f_5acf9cc47e780cafcc5e1a798c48a14b8d224532
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f_5acf9cc47e780cafcc5e1a798c48a14b8d224532.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f_5acf9cc47e780cafcc5e1a798c48a14b8d224532.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
92206304aa517b8756d458b05f3ffaebda9d044f_1c73e9ffeca12b8125bfe818bdc8d43ca356f3f3
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f_1c73e9ffeca12b8125bfe818bdc8d43ca356f3f3.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f_1c73e9ffeca12b8125bfe818bdc8d43ca356f3f3.jpg'}
metadata://posters/com.plexapp.agents.localmedia_92206304aa517b8756d458b05f3ffaebda9d044f
92206304aa517b8756d458b05f3ffaebda9d044f_5f059368b73d0074294d0cdadc1020aa01931a24
{'webImgPath': 'images/92206304aa517b8756d458b05f3ffaebda9d044f_5f059368b73d0074294d0cdadc1020aa01931a24.jpg', 'emailImgPath': 'blank.com/plexemail/images/92206304aa517b8756d458b05f3ffaebda9d044f_5f059368b73d0074294d0cdadc1020aa01931a24.jpg'}
Web page created successfully
Successfully sent 1 email(s)
 

Awesome, always good to fix a new issue with the media handling.  Looks like the issue was that local media shares the same image name so I just needed to add the folder hash to it to make sure it would be unique.

Thanks for testing.

v0.5.5 Released

Bug Fix

  • Now handles local media properly

Latest Release: https://github.com/jakewaldron/PlexEmail/releases/latest

Thanks for the quick fix!

I'm a noob with this python stuff but definitely want to try this out. I set it up and get this when I run it:

I'm a noob with this python stuff but definitely want to try this out. I set it up and get this when I run it:

Hi there,

It looks like you are running Python 3.  This script requires 2.7 for it to work.  Please try downloading the Mac version from here: https://www.python.org/downloads/release/python-279/

Once you do that let me know if there are any other issues and I will try to help you.

eadwyn,

  Maybe you can add a section at the top for us to edit a note to the viewers.

I just ran a lot of movies thru FileBot and I have a feeling all of them are going to show up as new, causing a huge list.

A note at the top would at least give a warning for something like this or to just say Happy Viewing!