Our forum migration to Discourse will be going on starting late today June 19 to 21. During the migration, the forums will be read-only, except for a single temporary forum (which will not be getting transferred). Read our announcement post here for more information https://forums.plex.tv/discussion/319354/well-be-moving-the-forums-to-discourse-heres-the-scoop/
Hey folks, there is a new Podcast category for forums https://forums.plex.tv/categories/podcasts
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

PlexEmail - Email Recently Added Media

14142434547

Comments

  • foebikfoebik Posts: 594Members, Plex Pass Plex Pass

    ... placed it in the scripts folder in Python...

    The VBS file needs to reside in the same directory as the plexEmail.py file. Then set it up in your Task Scheduler.

  • linkjoy123linkjoy123 Posts: 41Members, Plex Pass Plex Pass

    @foebik said:

    ... placed it in the scripts folder in Python...

    The VBS file needs to reside in the same directory as the plexEmail.py file. Then set it up in your Task Scheduler.

    It is in the same directory.

    PLease tell me exactly how to setup the task scheduler. Because even if I run the VBS manually, it still doesn't work.

  • linkjoy123linkjoy123 Posts: 41Members, Plex Pass Plex Pass

    It seems if I right click the VBS file and RUN IN COMMAND PROMPT the VBS works. Any other way it doesn't. How do I get the scheduler to run it in the CMD prompt?

  • harrogukharroguk Posts: 179Members, Plex Pass Plex Pass

    If I remember the VBS is just calling the script via python.

    so the actual command would be some kind of...
    C:\InstalledPrograms\Python27\Python.exe C:\InstalledPrograms\PlexEmail\scripts\PlexEmail.py

    Obviously you need to change your paths.

    all-thin-banner.jpg

  • linkjoy123linkjoy123 Posts: 41Members, Plex Pass Plex Pass

    Pictures DO NOT show up in emails, but do show up on the website that PlexEmail creates (I use IIS.)

    It seems you have the pictures link to the Plex server itself, and not the website or at least embed the pics in the email.

    The email can't login to the plex server, therefore the pic links will be broken.

    Can you fix this?

  • nonadznonadz Posts: 28Members, Plex Pass Plex Pass

    Maybe a stupid question, but Im running this on my RPi at v0.9.0 and want to update to v0.9.3. What is the best way to do this without messing up the config etc?

    Thanks and sorry if this is stupid.

  • JamminRJamminR Posts: 3,537Members, Plex Pass Plex Pass

    @nonadz said:
    What is the best way to do this without messing up the config etc?

    Back up any config files you have.
    Replace all current .90 files with .93 (using whatever method you installed originally, zip or git)
    Rename the default .93 config.ini file to config.original or something you know is the original non-custom to you.
    Paste your backed up modified config.ini file back into the same place the one you just renamed was.
    Compare the two config files to make sure there aren't any new options.
    Add/change any options that you find in the .93 original to your older config.ini

    Server - HW: I7-4790K(Haswell), 16GB - SW: Win10 Pro + PMS v1.13.2.5154
    Misc. HW: HDHR Extend + 2TB RAID1(Intel Z87) + 4x4TB RAID5(QNAP TS-653Pro)
    Shares - From: 2  - To: 18(5) - Potential lifetime PlexPass data generating product customer!
    ISP: ~20mbps up/1TB monthly "cap" - (Monthly avg. xfer ~375gb(~50gb server))
    Search the Plex WIKI before asking silly questions.
    Plex stuff I favor - Tautulli - UASv3 - FMoviesPlus
  • nonadznonadz Posts: 28Members, Plex Pass Plex Pass
    edited January 8

    @JamminR said:

    @nonadz said:
    What is the best way to do this without messing up the config etc?

    Back up any config files you have.
    Replace all current .90 files with .93 (using whatever method you installed originally, zip or git)
    Rename the default .93 config.ini file to config.original or something you know is the original non-custom to you.
    Paste your backed up modified config.ini file back into the same place the one you just renamed was.
    Compare the two config files to make sure there aren't any new options.
    Add/change any options that you find in the .93 original to your older config.ini

    Thanks!

    This was about what I was thinking. I bet the best way is to check at github what lines have been added/modified in the config.

    Thanks again!

  • JamminRJamminR Posts: 3,537Members, Plex Pass Plex Pass

    @nonadz said:
    Thanks!

    This was about what I was thinking. I bet the best way is to check at github what lines have been added/modified in the config.

    Thanks again!

    Welcome. I presume most people here are often not tech enough to know how to read the changes, but for a tech who knows how to read Git updates, that's the easiest. + this - that.
    I noticed there's been at least one or two in my quick review since .90

    Server - HW: I7-4790K(Haswell), 16GB - SW: Win10 Pro + PMS v1.13.2.5154
    Misc. HW: HDHR Extend + 2TB RAID1(Intel Z87) + 4x4TB RAID5(QNAP TS-653Pro)
    Shares - From: 2  - To: 18(5) - Potential lifetime PlexPass data generating product customer!
    ISP: ~20mbps up/1TB monthly "cap" - (Monthly avg. xfer ~375gb(~50gb server))
    Search the Plex WIKI before asking silly questions.
    Plex stuff I favor - Tautulli - UASv3 - FMoviesPlus
  • konior21konior21 Posts: 20Members, Plex Pass Plex Pass

    My emails didn't go out today as they always do. I haven't made any changes. I have the following error in my log:

    ERROR:Logging an uncaught exception
    Traceback (most recent call last):
    File "plexEmail.py", line 1717, in
    sharedEmails = getSharedUserEmails()
    File "plexEmail.py", line 332, in getSharedUserEmails
    response = requests.post(url, headers=headers)
    File "C:\Python27\lib\requests\api.py", line 99, in post
    return request('post', url, data=data, json=json, **kwargs)
    File "C:\Python27\lib\requests\api.py", line 49, in request
    response = session.request(method=method, url=url, **kwargs)
    File "C:\Python27\lib\requests\sessions.py", line 461, in request
    resp = self.send(prep, **send_kwargs)
    File "C:\Python27\lib\requests\sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
    File "C:\Python27\lib\requests\adapters.py", line 431, in send
    raise SSLError(e, request=request)
    SSLError: hostname 'my.plexapp.com' doesn't match either of 'plex.tv', 'www.plex.tv'

  • carlosmg2carlosmg2 Posts: 34Members, Plex Pass Plex Pass

    @konior21 said:
    My emails didn't go out today as they always do. I haven't made any changes. I have the following error in my log:

    ERROR:Logging an uncaught exception
    Traceback (most recent call last):
    File "plexEmail.py", line 1717, in
    sharedEmails = getSharedUserEmails()
    File "plexEmail.py", line 332, in getSharedUserEmails
    response = requests.post(url, headers=headers)
    File "C:\Python27\lib\requests\api.py", line 99, in post
    return request('post', url, data=data, json=json, **kwargs)
    File "C:\Python27\lib\requests\api.py", line 49, in request
    response = session.request(method=method, url=url, **kwargs)
    File "C:\Python27\lib\requests\sessions.py", line 461, in request
    resp = self.send(prep, **send_kwargs)
    File "C:\Python27\lib\requests\sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
    File "C:\Python27\lib\requests\adapters.py", line 431, in send
    raise SSLError(e, request=request)
    SSLError: hostname 'my.plexapp.com' doesn't match either of 'plex.tv', 'www.plex.tv'

    same here. there must be some change related to_ my.plexapp.com_ from plex side...
    waiting for a fix

  • JamminRJamminR Posts: 3,537Members, Plex Pass Plex Pass

    @carlosmg2 @konior21 -
    Can you use "plexEmail.py -t" and it work (send you a test mail)?
    Are you using latest version? I just tried using .9.3 and got the test mail.
    What OS are you on? What Plex server version?
    Thinking 'oh, maybe test doesn't grab the email addresses', I looked in my logs and can tell that it did, it posted all of them in the logs, including the json returned from the my.plexapp.com request.

    • 2018-01-12 17:23:56,434 - INFO:getSharedUserEmails: begin
    • 2018-01-12 17:23:56,434 - INFO:getSharedUserEmails: url = https://my.plexapp.com/users/sign_in.json
    • 2018-01-12 17:23:57,621 - INFO:getSharedUserEmails: response =
    • 2018-01-12 17:23:57,621 - INFO:getSharedUserEmails: response = {"user":{bunch of personal account json details removed here}}
    • 2018-01-12 17:23:57,621 - INFO:getSharedUserEmails: token = *** removed ***
    • 2018-01-12 17:23:57,621 - INFO:getSharedUserEmails: url = https://plex.tv/pms/friends/all
    • 2018-01-12 17:23:58,403 - INFO:getSharedUserEmails: response =
    • 2018-01-12 17:23:58,403 - INFO:getSharedUserEmails: response = <?xml version="1.0" encoding="UTF-8"?>
    • return of Media container shares, then
    • return of list of email addresses
    Server - HW: I7-4790K(Haswell), 16GB - SW: Win10 Pro + PMS v1.13.2.5154
    Misc. HW: HDHR Extend + 2TB RAID1(Intel Z87) + 4x4TB RAID5(QNAP TS-653Pro)
    Shares - From: 2  - To: 18(5) - Potential lifetime PlexPass data generating product customer!
    ISP: ~20mbps up/1TB monthly "cap" - (Monthly avg. xfer ~375gb(~50gb server))
    Search the Plex WIKI before asking silly questions.
    Plex stuff I favor - Tautulli - UASv3 - FMoviesPlus
  • konior21konior21 Posts: 20Members, Plex Pass Plex Pass

    The test email worked. I believe I am on the latest version of PlexEmail, but I not sure how to check.

    I am running Plex 1.110.4666, which should be the latest version. My OS is Windows Server 2012 R2.

  • JamminRJamminR Posts: 3,537Members, Plex Pass Plex Pass
    edited January 13

    @konior21 - Check your plexemail log from the test - it should show the email addresses , each in a single line, at the time you ran your test. To determine plexemail version, you can go to a command line, cd to the directory of plexemail, then run plexemail --version (example below presumes you have python.exe in execution path)

    X:\PlexStuff\PlexEmail>plexEmail.py --version
    returns
    Script Version: v0.9.3

    It's possible carlosmg2's comment 'fix on plex side' was indeed a certificate issue of some sort that did get fixed . My weekly script also ran fine last night, but yours should be working unless Win2k12 is having issues with DigiCert, Plex's SSL provider, or perhaps also, some older version of python or requests (and/or its dependencies) is causing issue.
    I'm Win10 Pro. Yesterday when my test and weekly scheduled notice worked, I was on Python 2.7.12, requests 2.8. Requests has some dependencies, including one that seems to mention 'certificate' in the title name. I only know this because I updated a bunch of my python/plex app stuff this morning and remember seeing it.

    Server - HW: I7-4790K(Haswell), 16GB - SW: Win10 Pro + PMS v1.13.2.5154
    Misc. HW: HDHR Extend + 2TB RAID1(Intel Z87) + 4x4TB RAID5(QNAP TS-653Pro)
    Shares - From: 2  - To: 18(5) - Potential lifetime PlexPass data generating product customer!
    ISP: ~20mbps up/1TB monthly "cap" - (Monthly avg. xfer ~375gb(~50gb server))
    Search the Plex WIKI before asking silly questions.
    Plex stuff I favor - Tautulli - UASv3 - FMoviesPlus
  • carlosmg2carlosmg2 Posts: 34Members, Plex Pass Plex Pass

    Hi, just wanted to say that my issue was fixed with the change that jakewaldron posted here

  • JamminRJamminR Posts: 3,537Members, Plex Pass Plex Pass
    edited February 20

    Has anyone here done a custom template/css/framework/php of the web data PlexEmail creates?
    Mind sharing? Or recommend another python recently added in >time period< export to html script?
    I tried poking at making my index.html a bit smoother on the eyes, and after an hour or two of futile attempts due to my design inexperience, combined with the fact the index.html seems a hodge-podge of bootstrap, a custom css, and hardcoded style tags, gave up in defeat and went insane all at the same time. (I wasn't far away from edge)

    Server - HW: I7-4790K(Haswell), 16GB - SW: Win10 Pro + PMS v1.13.2.5154
    Misc. HW: HDHR Extend + 2TB RAID1(Intel Z87) + 4x4TB RAID5(QNAP TS-653Pro)
    Shares - From: 2  - To: 18(5) - Potential lifetime PlexPass data generating product customer!
    ISP: ~20mbps up/1TB monthly "cap" - (Monthly avg. xfer ~375gb(~50gb server))
    Search the Plex WIKI before asking silly questions.
    Plex stuff I favor - Tautulli - UASv3 - FMoviesPlus
  • sossienlsossienl Posts: 7Members, Plex Pass Plex Pass

    @JamminR said:
    Has anyone here done a custom template/css/framework/php of the web data PlexEmail creates?
    Mind sharing? Or recommend another python recently added in >time period< export to html script?
    I tried poking at making my index.html a bit smoother on the eyes, and after an hour or two of futile attempts due to my design inexperience, combined with the fact the index.html seems a hodge-podge of bootstrap, a custom css, and hardcoded style tags, gave up in defeat and went insane all at the same time. (I wasn't far away from edge)

    I've spend hours to re-create a template that looks a bit more appealing. This is how far I got. I needed to adjust the whole Python script to even come close to what I really want.


    ,

  • Cyb3rGh05tCyb3rGh05t Posts: 359Members, Plex Pass Plex Pass

    @sossienl said:

    @JamminR said:
    Has anyone here done a custom template/css/framework/php of the web data PlexEmail creates?
    Mind sharing? Or recommend another python recently added in >time period< export to html script?
    I tried poking at making my index.html a bit smoother on the eyes, and after an hour or two of futile attempts due to my design inexperience, combined with the fact the index.html seems a hodge-podge of bootstrap, a custom css, and hardcoded style tags, gave up in defeat and went insane all at the same time. (I wasn't far away from edge)

    I've spend hours to re-create a template that looks a bit more appealing. This is how far I got. I needed to adjust the whole Python script to even come close to what I really want.


    ,

    Looks awesome :) really nice work :)
    Would you mind sharing your sript with me?

    Thanks and have a nice day :)

    My PlexConnect Theme "Revenant"
    Apple  TV 2 & 3
                                    
    Donate
     USD EUR

  • JamminRJamminR Posts: 3,537Members, Plex Pass Plex Pass
    edited February 28

    Those do look good on mobile. Do they work well on normal PC screen too?

    ** JamminR gets pushy - calls name of several python/plex devs he knows (in vain, knowing each and every one of them is already buried in real life and support of their own releases.
    @eadwyn , @coder-alpha , @ljunkie (I know, you REALLY have no time, but, hey, call a dev friend) , @sander1 , @Twoure , @TehCrucible , @dane22, @shopgirl284
    ** JamminR dreams big anyway

    I really wish there were a html framework/template file for Plex updates for PlexEmail, or any other new dev project. I imagine a template file with 'variables'. Python script runs, grabs template, loops, looking for key classes and variable names, spits out HTML. This wouldn't be an active server like Mako, this would be a run once every and go, much like PlexEmail.
    Unfortunately, I'm an 98% idea person with 2% code capability. I've tried becoming more and, though have bright flashes once in a while, normally a standard bulb in the 4 pack.

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <html>
      <head>
        <title>
          --title_var--
        </title>
      </head>
      <body>
        <div class="header">
            <div class=date> </div>
        </div>
        <div class="movies">
            <div class=title> var </div>
            <div class=plot> var </div>
            <div class=releaseinfo> var </div>
        </div>
        <div class="shows">
        <div class=title> var </div>
            <div class=plot> var </div>
            <div class=releaseinfo> var </div>
        </div>
        <div class="seasons">
        <div class=title> var </div>
            <div class=plot> var </div>
            <div class=releaseinfo> var </div>
        </div>
        <div class="episodes">
        <div class=title> var </div>
            <div class=plot> var </div>
            <div class=releaseinfo> var </div>
        </div>
      </body>
    </html>
    

    In my dream, PlexEmail or some other dev release would grab the template, loop through each class div looking for a variable, fill the variable with the info, looping as many times as new stuff was added, skipping any code/elements/text around it, just replacing the var names inside each div.

    Yeah, an inventor can dream. :)
    (Devs out there...get to it, fork PlexEmail, research other projects out there that I know can do web framework template and release!)

    EDIT - not shown in example but of course a variable need be included, anchor links and image file links, just like is hardcoded by PlexEmail now.

    Server - HW: I7-4790K(Haswell), 16GB - SW: Win10 Pro + PMS v1.13.2.5154
    Misc. HW: HDHR Extend + 2TB RAID1(Intel Z87) + 4x4TB RAID5(QNAP TS-653Pro)
    Shares - From: 2  - To: 18(5) - Potential lifetime PlexPass data generating product customer!
    ISP: ~20mbps up/1TB monthly "cap" - (Monthly avg. xfer ~375gb(~50gb server))
    Search the Plex WIKI before asking silly questions.
    Plex stuff I favor - Tautulli - UASv3 - FMoviesPlus
  • konior21konior21 Posts: 20Members, Plex Pass Plex Pass
    edited March 1

    Getting the following error, even with a test email. Not sure if this would cause it but I did add about 500 new TV episodes this week.

    2018-03-01 14:10:36,375 - ERROR:Logging an uncaught exception
    Traceback (most recent call last):
    File "C:\PlexEmail\scripts\plexEmail.py", line 1717, in
    sharedEmails = getSharedUserEmails()
    File "C:\PlexEmail\scripts\plexEmail.py", line 332, in getSharedUserEmails
    response = requests.post(url, headers=headers)
    File "C:\Python27\lib\requests\api.py", line 99, in post
    return request('post', url, data=data, json=json, **kwargs)
    File "C:\Python27\lib\requests\api.py", line 49, in request
    response = session.request(method=method, url=url, **kwargs)
    File "C:\Python27\lib\requests\sessions.py", line 461, in request
    resp = self.send(prep, **send_kwargs)
    File "C:\Python27\lib\requests\sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
    File "C:\Python27\lib\requests\adapters.py", line 415, in send
    raise ConnectionError(err, request=request)
    ConnectionError: ('Connection aborted.', error(10061, 'No connection could be made because the target machine actively >refused it'))

Sign In or Register to comment.