Skip to content

Instantly share code, notes, and snippets.

@blacktwin
blacktwin / notify_newip_short.py
Last active February 14, 2017 23:11
If IP address is new use Email Notification Agent.
# 1. Install the requests module for python.
# pip install requests
# 2. Add script arguments in PlexPy.
# {user} {user_id} {ip_address}
import requests
import sys
user = sys.argv[1]
user_id = sys.argv[2]
@blacktwin
blacktwin / notify_newip.py
Last active October 27, 2016 02:15
If a new IP is found send notification via the Email Notification Agent. Email contains User's Avatar image, link to location, IP address, and User's Email address.
"""
Pulling together User IP information and Email.
"""
import argparse
import requests
import sys
## -sn {show_name} -ena {episode_name} -ssn {season_num00} -enu {episode_num00} -srv {server_name} -med {media_type} -pos {poster_url} -tt {title} -sum {summary} -lbn {library_name} -ip {ip_address} -us {user} -uid {user_id} -pf {platform} -pl {player} -da {datestamp} -ti {timestamp}
@blacktwin
blacktwin / notify_on_added.py
Last active February 22, 2017 14:17
Send an Email notification when a specific show is added to Plex. Add shows to list that you want notifications for.
"""
PlexPy > Settings > Notification Agents > Scripts > Bell icon:
[X] Notify on Recently Added
PlexPy > Settings > Notification Agents > Scripts > Gear icon:
Recently Added: notify_on_added.py
PlexPy > Settings > Notifications > Script > Script Arguments:
-sn {show_name} -ena {episode_name} -ssn {season_num00} -enu {episode_num00} -srv {server_name} -med {media_type} -pos {poster_url} -tt {title} -sum {summary} -lbn {library_name}
You can add more arguments if you want more details in the email body