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

145791047

Comments

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    zprewitt wrote on March 14 2015, 4:44 AM: »

    It was not, but now it is, and Success!
     
    How do I schedule this to run on OSX weekly?


    Great news!

    You need to create a cron job. Here is a tutorial: http://www.maclife.com/article/columns/terminal_101_creating_cron_jobs
  • zprewittzprewitt Posts: 61Members, Plex Pass Plex Pass
    eadwyn wrote on March 14 2015, 4:47 AM: »

    Great news!

    You need to create a cron job. Here is a tutorial: http://www.maclife.com/article/columns/terminal_101_creating_cron_jobs

    Thanks, I'll check that out. One more question: How exactly does cloudinary work here? Is it a substitute for not having a webserver? If so, can I use it for the web page when I click on the View as Web Page link?

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    zprewitt wrote on March 14 2015, 4:50 AM: »

    Thanks, I'll check that out. One more question: How exactly does cloudinary work here? Is it a substitute for not having a webserver? If so, can I use it for the web page when I click on the View as Web Page link?


    It's an image hosting service like imgur or photobucket, but does not have any upload limits. Sadly it won't replace a web server. It's main purpose is to have images work on all email providers (I.e. Hotmail has issues with attached images).
  • zprewittzprewitt Posts: 61Members, Plex Pass Plex Pass
    eadwyn wrote on March 14 2015, 4:52 AM: »

    It's an image hosting service like imgur or photobucket, but does not have any upload limits. Sadly it won't replace a web server. It's main purpose is to have images work on all email providers (I.e. Hotmail has issues with attached images).

    Got it. Thanks for helping me with this!

  • 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:

    Ok, set up a dev box with a fresh install of cent OS and got the script working by doing the following:

    Install dev tools

    yum groupinstall "Development tools"
    yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

    Install Python 2.7

    wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
    tar -xvf Python-2.7.9.tgz
    cd Python-2.7.9
    ./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
    make & make altinstall
    Install requests module
    wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
    python2.7 ez_setup.py
    easy_install-2.7 pip
    pip2.7 install requests
    Install correct version of sqlite (does not affect the version the OS relies on)
    wget http://www.sqlite.org/2014/sqlite-autoconf-3080500.tar.gz
    tar -xvf sqlite-autoconf-3080500.tar.gz
    cd sqlite-autoconf-3080500.tar.gz
    ./configure --prefix=/opt/sqlite3.8.5          \
                     --disable-static                   \
                     CFLAGS=" -Os                       \
                     -frecord-gcc-switches              \
                     -DSQLITE_ENABLE_COLUMN_METADATA=1"
    make & makeinstall
    Temporarily change the version of sqlite for the run of the python scrip and then set it back. Update python2.7 ./plexEmail.py with the correct path to the script
    export LPATH_BAK=$LD_LIBRARY_PATH ; export PATH_BAK=$PATH   && \
    export LD_LIBRARY_PATH=/opt/mono/lib:/opt/sqlite3.8.5/lib   && \
    export PATH=/opt/mono/bin:/opt/sqlite3.8.5/bin:$PATH        && \
    python2.7 ./plexEmail.py               ;  \
    export PATH=$PATH_BAK ; export LD_LIBRARY_PATH=$LPATH_BAK

    Let me know if this works for you!

  • TheDeepestBlackTheDeepestBlack Posts: 33Members, Plex Pass Plex Pass

    This looks great and I'd love to test it a bit before I start sending out the emails but I can't seem to get the site up and running. 

    I added the web folder to my www, renamed it to plexemail, and ran the vbs but when I go to access the site localhost/plexemail only a directory comes up that looks like whats inside the web folder.

    I assumed this would work like plexwwwatch or plexwatchweb where I just add a folder to my www and access it with localhost/plexwwwatch etc...

    When I look in the web folder theres no html or php files...

    So how do I test the webpage alone? 

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    SimpleGreen wrote on March 15 2015, 2:13 AM: »

    This looks great and I'd love to test it a bit before I start sending out the emails but I can't seem to get the site up and running.
    I added the web folder to my www, renamed it to plexemail, and ran the vbs but when I go to access the site localhost/plexemail only a directory comes up that looks like whats inside the web folder.

    I assumed this would work like plexwwwatch or plexwatchweb where I just add a folder to my www and access it with localhost/plexwwwatch etc...

    When I look in the web folder theres no html or php files...

    So how do I test the webpage alone?


    Running the script will create the index.html page.
  • TheDeepestBlackTheDeepestBlack Posts: 33Members, Plex Pass Plex Pass
    eadwyn wrote on March 15 2015, 2:29 AM: »

    Running the script will create the index.html page.

    I thought so, so I have something wrong in the config file. Back to the drawing board.

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    SimpleGreen wrote on March 15 2015, 2:31 AM: »

    I thought so, so I have something wrong in the config file. Back to the drawing board.


    Feel free to send me the config file to look at later today.
  • drzoidberg33drzoidberg33 Posts: 2,566Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    eadwyn wrote on March 14 2015, 10:29 PM: »

    Ok, set up a dev box with a fresh install of cent OS and got the script working by doing the following:

    Install dev tools

    yum groupinstall "Development tools"
    yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

    Install Python 2.7

    wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
    tar -xvf Python-2.7.9.tgz
    cd Python-2.7.9
    ./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
    make & make altinstall
    Install requests module
    wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
    python2.7 ez_setup.py
    easy_install-2.7 pip
    pip2.7 install requests
    Install correct version of sqlite (does not affect the version the OS relies on)
    wget http://www.sqlite.org/2014/sqlite-autoconf-3080500.tar.gz
    tar -xvf sqlite-autoconf-3080500.tar.gz
    cd sqlite-autoconf-3080500.tar.gz
    ./configure --prefix=/opt/sqlite3.8.5          \
                     --disable-static                   \
                     CFLAGS=" -Os                       \
                     -frecord-gcc-switches              \
                     -DSQLITE_ENABLE_COLUMN_METADATA=1"
    make & makeinstall
    Temporarily change the version of sqlite for the run of the python scrip and then set it back. Update python2.7 ./plexEmail.py with the correct path to the script
    export LPATH_BAK=$LD_LIBRARY_PATH ; export PATH_BAK=$PATH   && \
    export LD_LIBRARY_PATH=/opt/mono/lib:/opt/sqlite3.8.5/lib   && \
    export PATH=/opt/mono/bin:/opt/sqlite3.8.5/bin:$PATH        && \
    python2.7 ./plexEmail.py               ;  \
    export PATH=$PATH_BAK ; export LD_LIBRARY_PATH=$LPATH_BAK

    Let me know if this works for you!

    Wow, thanks for going through all that effort. Really appreciate it, will give it a go tomorrow.

  • chansearringtonchansearrington Posts: 126Members, Plex Pass Plex Pass

    Any recommendations on what webserver to use on windows 8 machine. This will be my very first time to setup a& use a webserver and it will be exclusively for this and PlexWWWWatch

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    CArringt wrote on March 16 2015, 10:11 PM: »

    Any recommendations on what webserver to use on windows 8 machine. This will be my very first time to setup a& use a webserver and it will be exclusively for this and PlexWWWWatch

    I've used both apache and Wamp on my box with Windows 8.  Wamp is a bit easier to set up: http://www.wampserver.com/en/

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass

    v0.5.0 Released

     

    New Features and Bug Fixes

    • UTF-8 Characters now supported in the config file
    • Can now filter out specific libraries from being included
    • Can now control the fields shown for each title and can filter by each specific field

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

    Please refer to the Readme for help on the new fields: filter_libraries, filter_sections_movies and filter_sections_TV

  • peppe92peppe92 Posts: 44Members, Plex Pass Plex Pass
    edited March 2015
    sorry i've this error when i start python script (i'm running on linux ubuntu 14.04), how can i fix that?
    on com.plexapp.plugins.library.db i've this permissions : 644
    Traceback (most recent call last):  File "plexEmail.py", line 579, in <module>    cur.execute("SELECT id, parent_id, metadata_type, title, title_sort, original_title, rating, tagline, summary, content_rating, duration, user_thumb_url, tags_genre, tags_director, tags_star, year, hash, [index], studio FROM metadata_items WHERE added_at >= " + dateSearch + " AND metadata_type >= 1 AND metadata_type <= 4 " + libraryFilter + " ORDER BY title_sort;")sqlite3.OperationalError: unable to open database file

    EDIT: I've changed permissions and now it works fine
  • tycho1974tycho1974 Posts: 254Members, Plex Pass Plex Pass

    Hi, everyone. I've recently gotten PlexWatch/Web working, after loving PlexWatch for almost a year now. I just found this script, and I'd love to implement it on my system; I love the idea of notifying people when I add new items to my server.

    I've installed the pre-requisites, edited the config file, and run the script. Unfortunately, other than not receiving an email, I cannot determine if this is working or not. I don't need the website portion, I'd just love it if the email worked. Any tips?

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    peppe92 wrote on March 17 2015, 10:36 AM: »

    sorry i've this error when i start python script (i'm running on linux ubuntu 14.04), how can i fix that?
    on com.plexapp.plugins.library.db i've this permissions : 644

    Traceback (most recent call last):  File "plexEmail.py", line 579, in <module>    cur.execute("SELECT id, parent_id, metadata_type, title, title_sort, original_title, rating, tagline, summary, content_rating, duration, user_thumb_url, tags_genre, tags_director, tags_star, year, hash, [index], studio FROM metadata_items WHERE added_at >= " + dateSearch + " AND metadata_type >= 1 AND metadata_type <= 4 " + libraryFilter + " ORDER BY title_sort;")sqlite3.OperationalError: unable to open database file
    EDIT: I've changed permissions and now it works fine

    Glad to hear it works now, I was going to suggest a permissions issue since the error was on the execute instead of the connection.

    tycho1974 wrote on March 17 2015, 4:50 PM: »

    Hi, everyone. I've recently gotten PlexWatch/Web working, after loving PlexWatch for almost a year now. I just found this script, and I'd love to implement it on my system; I love the idea of notifying people when I add new items to my server.

    I've installed the pre-requisites, edited the config file, and run the script. Unfortunately, other than not receiving an email, I cannot determine if this is working or not. I don't need the website portion, I'd just love it if the email worked. Any tips?

    The script should tell you if it failed to send emails or how many emails it was able to send.  Could you give me what the script outputs when you run it?  Also, feel free to send me the config file for me to take a look at (edit out personal info).

  • tycho1974tycho1974 Posts: 254Members, Plex Pass Plex Pass
    eadwyn wrote on March 17 2015, 6:00 PM: »

    The script should tell you if it failed to send emails or how many emails it was able to send.  Could you give me what the script outputs when you run it?  Also, feel free to send me the config file for me to take a look at (edit out personal info).

    If I run the script from the Window command prompt, I get:

    Traceback (most recent call last):

       File "c:\python27\scripts\plexemail.py", line 9, in <module>

           import requests

    ImportError: No module named requests

    I will freely admit that I know nothing about Python, so maybe I'm just not doing something right. I made sure to install the prerequisites you list in your installation instructions as well.  I know that when I run the scheduled task, I get a "task ran successfully" message from Task Scheduler, but the command line result says different.  ¯\_(ツ)_/¯

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    tycho1974 wrote on March 17 2015, 8:00 PM: »

    If I run the script from the Window command prompt, I get:

    Traceback (most recent call last):

       File "c:\python27\scripts\plexemail.py", line 9, in <module>

           import requests

    ImportError: No module named requests

    I will freely admit that I know nothing about Python, so maybe I'm just not doing something right. I made sure to install the prerequisites you list in your installation instructions as well.  I know that when I run the scheduled task, I get a "task ran successfully" message from Task Scheduler, but the command line result says different.  ¯\_(ツ)_/¯

    Looks like you are missing the requests module.  For Windows you can download it here: https://github.com/kennethreitz/requests/archive/v2.5.1.zip

    Extract the requests folder to the Lib folder in your python installation.  For example: C:\python27\Lib\

  • tycho1974tycho1974 Posts: 254Members, Plex Pass Plex Pass
    eadwyn wrote on March 17 2015, 8:09 PM: »

    Looks like you are missing the requests module.  For Windows you can download it here: https://github.com/kennethreitz/requests/archive/v2.5.1.zip

    Extract the requests folder to the Lib folder in your python installation.  For example: C:\python27\Lib\

    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 <module>

       imageInfo = processImage(hash, imageInfo, '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.  ;)

  • eadwyneadwyn Posts: 231Members, Plex Pass Plex Pass
    tycho1974 wrote on March 17 2015, 8:25 PM: »

    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 <module>

       imageInfo = processImage(hash, imageInfo, '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. [attachment=46364:plexEmail.zip]

145791047
Sign In or Register to comment.