PlexEmail - Email Recently Added Media

I actually had the 2.5.3 version of that, but I had put the entire folder in "lib". Fixed that, now I'm closer! To wit:

File "c:\python27\scripts\plexemail.py", line 701, in

   imageInfo = processImage(hash, imageInfo['thumb'], 'show', 0, 0)

File "c:\python27\scripts\plexemail.py", line 169, in processImage

   category = thumb[0:thumb.index('/')]

ValueError: substring not found

BTW your response time is incredible. I really appreciate your dedication to the nerdier members of the Plex community.  ;)

No problem, it's a nice break from actual work :)  Looks like you might have found a new type of image in the db that I haven't run across yet or a bug.

Could you try running it with this script (will print all of the image db paths until it breaks), then send me the failure plus the line above it?  I also put in a potential fix so it might work. plexEmail.zip (9.07 KB)

No problem, it's a nice break from actual work :)  Looks like you might have found a new type of image in the db that I haven't run across yet or a bug.

Could you try running it with this script (will print all of the image db paths until it breaks), then send me the failure plus the line above it?  I also put in a potential fix so it might work. attachicon.gifplexEmail.zip

Sure thing. Here's a screenshot (I don't want to type all this, and I don't know how to dump the result to a text file):

plexemailresult.PNG

Sure thing. Here's a screenshot (I don't want to type all this, and I don't know how to dump the result to a text file):

Looks like there is no image for that item and that is causing it to break.  I've added handling for cases where there is no image.  Please try this and let me know if it works before I push it to Git: plexEmail.zip (9.07 KB)

EDIT: For future reference you can copy in the cmd window by right-clicking, selecting 'Mark' highlighting the text and pressing enter.

Looks like there is no image for that item and that is causing it to break.  I've added handling for cases where there is no image.  Please try this and let me know if it works before I push it to Git: attachicon.gifplexEmail.zip

EDIT: For future reference you can copy in the cmd window by right-clicking, selecting 'Mark' highlighting the text and pressing enter.

Success! Email was generated and sent, and the (local) web page content was created. The only issue I see is that in the email, only 4 out of I think 30 or so posters show up. Where do the posters get sourced from? When I view the web page on the server computer, all posters and thumbnails show up perfectly...

Glad to hear!  What email provider? Depending on your settings, they can be sourced from the web page, attached directly to the email or uploaded to Cloudinary.

It will use images from your web server if these are set:

web_enabled = True

email_use_web_images = True

upload_use_cloudinary = False

It will use images from Cloudinary if this is set:

upload_use_cloudinary = True

It will attach images to the email if these are set:

upload_use_cloudinary = False

AND

web_enabled = False

OR

email_use_web_images = False

Glad to hear!  What email provider? Depending on your settings, they can be sourced from the web page, attached directly to the email or uploaded to Cloudinary.

It will use images from your web server if these are set:

web_enabled = True

email_use_web_images = True

upload_use_cloudinary = False

It will use images from Cloudinary if this is set:

upload_use_cloudinary = True

It will attach images to the email if these are set:

upload_use_cloudinary = False

AND

web_enabled = False

OR

email_use_web_images = False

I use my work's email server, not a commercial one. I'll double-check those settings and get back to you. Thanks again!

I use my work's email server, not a commercial one. I'll double-check those settings and get back to you. Thanks again!

I would recommend using your own web server for the images or Cloudinary.  Some recipient providers have issues with directly attaching images to emails.

What are the chances this will simplified and a package created for freenas so it’s plug and play?

What are the chances this will simplified and a package created for freenas so it's plug and play?

At the moment, I don't have any plans for that; however once I feel like the majority of bugs are ironed out and the main features I want are in, I will look into how to simplify the install process.

I would recommend using your own web server for the images or Cloudinary.  Some recipient providers have issues with directly attaching images to emails.

How would I go about doing this? I've checked the values in the config file, and everything appears kosher, but I'm still not getting images (except for 2) when I view the email in Thunderbird. Interesting detail: When I view the exact same email on my iPhone, all thumbnails show up. Hrm.

How would I go about doing this? I've checked the values in the config file, and everything appears kosher, but I'm still not getting images (except for 2) when I view the email in Thunderbird. Interesting detail: When I view the exact same email on my iPhone, all thumbnails show up. Hrm.

To start please give me the values for these 3 values:

web_enabled
email_use_web_images
upload_use_cloudinary

To start please give me the values for these 3 values:

web_enabled
email_use_web_images
upload_use_cloudinary

-False

-False

-False

-False
-False
-False

Looks like it issue with Thunderbird showing attached images (the one's you can see have external links). You can try the following in Thunderbird to see if it works:

For images embedded in messages: make sure that the setting for "View -> Message Body As" is set to either "Original HTML" or "Simple HTML".
For images attached to messages: go to the "View" menu and make sure that "Display Attachments Inline" is checked.

I would suggest creating a Cloudinary account though because it will host images where there should be no problem seeing them in emails since it appears not all clients handle them well. To do this, create an account, set upload_use_cloudinary to True and fill in the other 3 fields that you will get from creating the account.

Looks like it issue with Thunderbird showing attached images (the one's you can see have external links). You can try the following in Thunderbird to see if it works:

For images embedded in messages: make sure that the setting for "View -> Message Body As" is set to either "Original HTML" or "Simple HTML".
For images attached to messages: go to the "View" menu and make sure that "Display Attachments Inline" is checked.

I would suggest creating a Cloudinary account though because it will host images where there should be no problem seeing them in emails since it appears not all clients handle them well. To do this, create an account, set upload_use_cloudinary to True and fill in the other 3 fields that you will get from creating the account.

Okay, so those Thunderbird settings were already correct, and the thumbnails still didn't show up, except for those 2. It's like they were mocking me. So I changed those three "falses" to "trues", and entered the cloudinary info. Works perfectly now. I removed the option for viewing as a web page, so I'm at 100% pleased.

I have to say again: your dedication to Plex users is impressive, as is your response time. I get the feeling that you are like myself and many others here, in the sense that once you get a project going - especially one that other people use - you genuinely want to continue tweaking, fine-tuning, evolving, and improving the entire user experience. I personally like seeing that in other people, and I thank you again for enriching the Plex experience for dataporn-loving powerusers like me. Everytime I find something like this I try to hip as many people to it as I can, and PlexEmail is no exception.

Okay, so those Thunderbird settings were already correct, and the thumbnails still didn't show up, except for those 2. It's like they were mocking me. So I changed those three "falses" to "trues", and entered the cloudinary info. Works perfectly now. I removed the option for viewing as a web page, so I'm at 100% pleased.

I have to say again: your dedication to Plex users is impressive, as is your response time. I get the feeling that you are like myself and many others here, in the sense that once you get a project going - especially one that other people use - you genuinely want to continue tweaking, fine-tuning, evolving, and improving the entire user experience. I personally like seeing that in other people, and I thank you again for enriching the Plex experience for dataporn-loving powerusers like me. Everytime I find something like this I try to hip as many people to it as I can, and PlexEmail is no exception.

Great news that it works now!

Thanks for the compliment!

Excellent work. I have 2 feature requests to suggest

1. Rather than strictly time based, an option to show all new items "since last run"

2. If it is possible, add links to go directly to the movie/episode page within the PMS web interface

Excellent work. I have 2 feature requests to suggest
 
1. Rather than strictly time based, an option to show all new items "since last run"
2. If it is possible, add links to go directly to the movie/episode page within the PMS web interface


Thanks for the ideas! As for #1: I like the idea of the script being stateless so I'll have to think on this one. You can achieve this right now by having a scheduled task run for the same time as the script searches backwards though.

For #2: I think it is a great idea and it looks to be relatively easy to implement. I'll give it a go tomorrow.

Thanks for the ideas! As for #1: I like the idea of the script being stateless so I'll have to think on this one. You can achieve this right now by having a scheduled task run for the same time as the script searches backwards though.

For #2: I think it is a great idea and it looks to be relatively easy to implement. I'll give it a go tomorrow.

One other thing I just noticed, the reported runtime does not reflect the actual media file. For example, the latest Walking Dead episode shows 45 minutes but is 43, the latest Talking Dead shows 60 minutes but is 42. 

One other thing I just noticed, the reported runtime does not reflect the actual media file. For example, the latest Walking Dead episode shows 45 minutes but is 43, the latest Talking Dead shows 60 minutes but is 42. 

It's currently using the time that comes back from the metadata agents.  It looks like I can actually get the actual duration of the file so I'll take a look at implementing that.

Excellent work. I have 2 feature requests to suggest

1. Rather than strictly time based, an option to show all new items "since last run"

2. If it is possible, add links to go directly to the movie/episode page within the PMS web interface

One other thing I just noticed, the reported runtime does not reflect the actual media file. For example, the latest Walking Dead episode shows 45 minutes but is 43, the latest Talking Dead shows 60 minutes but is 42. 

v0.5.2 Released

 

New Features

  • The images and titles are now hyperlinks to the Plex Web page.
  • If there is a real duration, we will use that instead of the duration from the metadata agents.

New relevant field in the config file: filter_include_plex_web_link (defaults to True)