jakewaldron / PlexEmail

This script aggregates all new TV, movie and music releases for the past configured time then optionally writes to your web directory and sends out an email.
206 stars 32 forks source link

Multiple Seasons Adding Compiling Issue #39

Closed Mawuena closed 8 years ago

Mawuena commented 8 years ago

Hello,

Anyone is having trouble running PlexEmail since their latest PMS update ? I'm running it through a Fedroa 24 Server btw and here is the output of my terminal

Traceback (most recent call last): File "plexEmail.py", line 1097, in imageInfo = processImage(hash, imageInfo['thumb'], 'season', tvSeasons[season]['index'], 0) File "plexEmail.py", line 341, in processImage imgName = thumb[thumb.index('') + 1:len(thumb)] ValueError: substring not found_

Tried to tinker with it a little bit with no help If anyone has an idea, I'd take it

Thanks guys

Mawuena commented 8 years ago

I think I know what is going on. Some of my medias aren't being recognized by Plexemail anymore When I change the setting (in the config file) "date_days_back_to_search" and exclude some specific days the email can be sent no problem. But upon including some days, when some specific media were added, I get the error message I have above.

Meaning that, when I delete the aforementioned medias, it'll be okay. Or better yet, all I have to do is wait for time to go by until Plexemail doesn't see them as new media anymore.

Hope my misfortune can enlighten someone else and help them save precious time if it happens to you

Mawuena commented 8 years ago

Hello,

Actually this issue is not solve. Just discovered that I get this error message whenever I add at least 3 seasons from a same TV Show. When I do that, it PlexEmail doesn't want to run anymore.

I'm running the latest version of PlexEmail, as well as the latest version of PMS.

You have an idea as to what could cause this please ?

jakewaldron commented 8 years ago

The latest code in master has a fix for this error. Could you give that a try? I am currently in the process of getting a show with 3+ seasons as well. I will give it a try once I have all the episodes.

Mawuena commented 8 years ago

Awesome thanks @jakewaldron However now when I compile nothing happens at all. I don't even think it accesses the database anymore at this stage.

jakewaldron commented 8 years ago

Hmm, nothing happens? This release added logging. Could you send me the logs (default location found in the logs folder)?

Mawuena commented 8 years ago

Oh crap, haven't noticed that there are logs now. Here there are. Not 100% sure of what's causing this but I'm seeing that it's trying to create a folder in my root folder (plexEmail/images) is that normal ?

plexEmail.log.txt

Mawuena commented 8 years ago

Sorry i think may have screwed up somewhere as I've modifid a bit your code and forgot to do the same with this update.

Gimme few minutes to reproduce it all

jakewaldron commented 8 years ago

Ok, hopefully making your changes will fix your issue. The issue in the log is that msg_header3 is not in the config file.

The issue with the images is that it looks like you have not set a web directory in your config file, so it can't find the correct location to copy the images to.

Mawuena commented 8 years ago

Yep it works perfectly now. Thank you so much for your help

However I still get (ever since we reached the 1.0 PMS update) some broken image links here and there (about 5% or so) And the weird part is, when I reload the email that same broken image whill show up and another one which showed up fine will now get broken.

Any idea ?

jakewaldron commented 8 years ago

I'm not sure. I'll keep an eye on my emails to see if I have any of those and can use those to troubleshoot. Are you hosting images on your own web server or using Cloudinary?

Mawuena commented 8 years ago

Everything is located on the plex server itself and nothing on cloudinary. But truthfully it's not that much of a bother.

Especially since the links behind said pictures are still active and upon cliking on it, it redirects you perfectly.

So don't worry about it. You fixed the most important aspect already