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

1235747

Comments

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    zprewitt wrote on March 13 2015, 7:05 PM: »
    1. 32 bit DLL for SQLite version 3.8.8.3 - http://www.sqlite.or...x86-3080803.zip (Put this into the DLLs folder of the Python installation)

    I HAVE to have Python installed on my machine (I use it for Sick Beard), but for the life of me I cannot find this DLL folder. Any ideas where I can look? 

    Windows?  If yes, then run the following on the command line:

    where python
    

    That should tell you where the installation is located.

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    drzoidberg33 wrote on March 13 2015, 12:20 PM: »

    Thanks,

    Still no go though. Had to compile Python2.7.9 using these instructions (otherwise it compiles without zlib): http://stackoverflow.com/a/27132584

    sqlite3 still not the correct version though:

    I'm going to try to get a dev box this weekend up and running so I can install CentOS and try to get it working.

  • zprewittzprewitt Posts: 61Members, Plex Pass Plex Pass
    eadwyn wrote on March 13 2015, 7:15 PM: »

    Windows?  If yes, then run the following on the command line:

    where python
    

    That should tell you where the installation is located.

    Sorry, I'm on Mac (Yosemite).

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    edited March 2015
    zprewitt wrote on March 13 2015, 7:22 PM: »

    Sorry, I'm on Mac (Yosemite).

    You might be the first to test on Mac (or it works flawlessly and no one has commented).  I'm excited to get this working for you so I can change it to tested!

    This might already be installed.  Could you try skipping this step?

    EDIT: I think the default location for the lib folder is here: /usr/lib/python2.7

  • WeeflixWeeflix Posts: 238Members, Plex Pass Plex Pass
    eadwyn wrote on March 13 2015, 5:49 PM: »

    Hi there,

    What version of Python are you running?

    python -V

    Looks like I was running 2.6.6  

    The latest version i could find on unraid was 2.7.3 . I'm now getting this error:

    Traceback (most recent call last):
      File "plexEmail.py", line 778, in <module>
        emailTVEpisodes += '<p class="lead"><i>S' + str(tvEpisodes[episode]['season_index']) + ' E' + str(tvEpisodes[episode]['index']) + ': ' + title + '</i></p>'
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 40: ordinal not in range(128)
    
    

    I guess I'll have to switch to windows instead.

  • zprewittzprewitt Posts: 61Members, Plex Pass Plex Pass
    edited March 2015
    eadwyn wrote on March 13 2015, 7:31 PM: »

    You might be the first to test on Mac (or it works flawlessly and no one has commented).  I'm excited to get this working for you so I can change it to tested!

    This might already be installed.  Could you try skipping this step?

    No, because of the aforementioned error when I try to run the script:

    Traceback (most recent call last):
      File "plexEmail.py", line 509, in <module>
        con = sqlite3.connect(DATABASE_FILE)
    sqlite3.OperationalError: unable to open database file
  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    Nomadore wrote on March 13 2015, 7:32 PM: »

    Looks like I was running 2.6.6  

    The latest version i could find on unraid was 2.7.3 . I'm now getting this error:

    Traceback (most recent call last):
      File "plexEmail.py", line 778, in <module>
        emailTVEpisodes += '<p class="lead"><i>S' + str(tvEpisodes[episode]['season_index']) + ' E' + str(tvEpisodes[episode]['index']) + ': ' + title + '</i></p>'
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 40: ordinal not in range(128)
    
    

    I guess I'll have to switch to windows instead.

    Actually that is good news.  Your setup is now where it should be.  This error is actually a bug fix that I put in this morning (haven't pushed a new release yet).

    Try this file: [attachment=46193:plexEmail.zip]

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    edited March 2015
    zprewitt wrote on March 13 2015, 7:32 PM: »

    No, because of the aforementioned error when I try to run the script:

    Traceback (most recent call last):
      File "plexEmail.py", line 509, in <module>
        con = sqlite3.connect(DATABASE_FILE)
    sqlite3.OperationalError: unable to open database file

    EDIT: After looking closer at the error, it might be a problem with the path to the database file.  Could you give me the value for plex_data_folder in the config file?

    Sorry, juggling a few different issues at the same time.  Could you try downloading and putting it here: /usr/lib/python2.7 (that is the default location on Mac)

    Actually the Mac file is this: http://www.sqlite.org/2015/sqlite-shell-osx-x86-3080803.zip

  • zprewittzprewitt Posts: 61Members, Plex Pass Plex Pass
    eadwyn wrote on March 13 2015, 7:38 PM: »

    EDIT: After looking closer at the error, it might be a problem with the path to the database file.  Could you give me the value for plex_data_folder in the config file?

    Sorry, juggling a few different issues at the same time.  Could you try downloading and putting it here: /usr/lib/python2.7 (that is the default location on Mac)

    Actually the Mac file is this: http://www.sqlite.org/2015/sqlite-shell-osx-x86-3080803.zip

    Found the folder and moved the sqlite3 file into it (it was already there, so I just replaced). Now seeing this:

    Traceback (most recent call last):
      File "plexEmail.py", line 1, in <module>
        import sqlite3
    ImportError: No module named sqlite3
  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    edited March 2015
    zprewitt wrote on March 13 2015, 7:48 PM: »

    Found the folder and moved the sqlite3 file into it (it was already there, so I just replaced). Now seeing this:

    Traceback (most recent call last):
      File "plexEmail.py", line 1, in <module>
        import sqlite3
    ImportError: No module named sqlite3

    Shoot.  My edit must have not been in time.  It looks like the previous version might have been working.

    To fix it, could you download this and put the lib folder inside that tar into /usr/lib/python2.7/sqlite3/:

    https://pypi.python.org/packages/source/p/pysqlite/pysqlite-2.6.3.tar.gz#md5=7ff1cedee74646b50117acff87aa1cfa

    The other file you downloaded should have gone into /usr/bin/

    Could you also give me the value you have for plex_data_folder  in the config folder?

    Sorry for the inconvenience!

  • zprewittzprewitt Posts: 61Members, Plex Pass Plex Pass
    eadwyn wrote on March 13 2015, 7:57 PM: »

    Shoot.  My edit must have not been in time.  It looks like the previous version might have been working.

    To fix it, could you download this and put the lib folder inside that tar into /usr/lib/python2.7/sqlite3/:

    https://pypi.python.org/packages/source/p/pysqlite/pysqlite-2.6.3.tar.gz#md5=7ff1cedee74646b50117acff87aa1cfa

    The other file you downloaded should have gone into /usr/bin/

    Could you also give me the value you have for plex_data_folder  in the config folder?

    Sorry for the inconvenience!

    There is no folder called 'sqlite3 ' in /usr/lib/python2.7, and when I tried to create one, it said the name was already taken.

  • zprewittzprewitt Posts: 61Members, Plex Pass Plex Pass
    eadwyn wrote on March 13 2015, 7:57 PM: »

    Could you also give me the value you have for plex_data_folder  in the config folder?

    /Library/Application Support/Plex Media Server

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    edited March 2015
    zprewitt wrote on March 13 2015, 8:03 PM: »

    There is no folder called 'sqlite3 ' in /usr/lib/python2.7, and when I tried to create one, it said the name was already taken.

    That's because of the previous file you put in there (I gave you the wrong location).  Could you delete the file sqlite3 in that folder? Then try to create it and put those files in.

    If we can't get it working, I'll bring a mac home from work to try and get it working over the weekend.

  • zprewittzprewitt Posts: 61Members, Plex Pass Plex Pass
    eadwyn wrote on March 13 2015, 8:06 PM: »

    That's because of the previous file you put in there (I gave you the wrong location).  Could you delete the file sqlite3 in that folder? Then try to create it and put those files in.

    If we can't get it working, I'll bring a mac home from work to try and get it working over the weekend.

    OK, done. Same error.

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    zprewitt wrote on March 13 2015, 8:11 PM: »

    OK, done. Same error.

    Darn, I'm going to start installing PMS on the mac I have here then try it out myself.

  • zprewittzprewitt Posts: 61Members, Plex Pass Plex Pass
    eadwyn wrote on March 13 2015, 8:16 PM: »

    Darn, I'm going to start installing PMS on the mac I have here then try it out myself.

    Just to clarify: the sqlite3 file you originally sent me you wanted in the usr/bin/ folder, correct? Because it was already there, and I replaced it.

  • WeeflixWeeflix Posts: 238Members, Plex Pass Plex Pass
    eadwyn wrote on March 13 2015, 7:36 PM: »

    Actually that is good news.  Your setup is now where it should be.  This error is actually a bug fix that I put in this morning (haven't pushed a new release yet).

    Try this file: attachicon.gifplexEmail.zip

    Woohoo, looks like the web and email is now working on my Unraid Server now.   

    Unrelated, but is there a way to just display the latest movies and not tv seasons/episodes?

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    Nomadore wrote on March 13 2015, 8:24 PM: »

    Woohoo, looks like the web and email is now working on my Unraid Server now.   

    Unrelated, but is there a way to just display the latest movies and not tv seasons/episodes?

    Good news!

    Not right now, but that's a good idea and I will add that in later.

  • WeeflixWeeflix Posts: 238Members, Plex Pass Plex Pass

    A more few ideas :) 

    1. Genre in Movie Description
    2. Filter based on Genre (Email with just new Horror Movies this week)
    3. Filter based on Content Rating (So we can have a Plex Email just for Kids)

    Thank you, this is great.

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    edited March 2015
    zprewitt wrote on March 13 2015, 8:04 PM: »

    /Library/Application Support/Plex Media Server

    Now I feel like a dummy.  Try setting it as:

    /Library/Application Support/

    Also, is that for sure the correct location?  When I installed PMS, this was the location:

    /Users/{User Name}/Library/Application Support/
Sign In or Register to comment.