This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Share functions from https://gist.github.com/JonnyWong16/f8139216e2748cb367558070c1448636 | |
Once user stream count hits LIMIT they are unshared from libraries expect for banned library. | |
Once user stream count is below LIMIT and banned library video is watched their shares are restored. | |
Once violation count have been reached ban permanently. | |
Caveats: | |
Unsharing doesn't pause the stream. | |
After unsharing user can pause but not skip ahead or skip back. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Find what was added TFRAME ago and not watched using PlexPy. | |
""" | |
import requests | |
import sys | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Find what was added TFRAME ago and not watched and notify admin using PlexPy. | |
""" | |
import requests | |
import sys | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Find when media was added between STARTFRAME and ENDFRAME to Plex through PlexPy. | |
This will only show for what has been wached. | |
api_sql must be manually enabled in the config file. | |
""" | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Find when media was added between STARTFRAME and ENDFRAME to Plex through PlexPy. | |
Some Exceptions have been commented out to supress what is printed. | |
Uncomment Exceptions if you run into problem and need to investigate. | |
""" | |
import requests | |
import sys | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Delete all playlists from Plex using PlexAPI | |
https://github.com/mjs7231/python-plexapi | |
""" | |
from plexapi.server import PlexServer | |
import requests | |
baseurl = 'http://localhost:32400' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Send an email with what was added to Plex in the past week using PlexPy. | |
Email includes title (TV: Show Name: Episode Name; Movie: Movie Title), time added, image, and summary. | |
""" | |
import requests | |
import sys | |
import time | |
import os | |
from email.mime.text import MIMEText |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Use PlexPy to count how many plays per user occurred this week. | |
Notify via PlexPy Notification | |
""" | |
import requests | |
import sys | |
import time | |
TODAY = int(time.time()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import sys | |
import time | |
TODAY = int(time.time()) | |
LASTWEEK = int(TODAY - 7 * 24 * 60 * 60) | |
## EDIT THESE SETTINGS ## | |
PLEXPY_APIKEY = 'XXXXXX' # Your PlexPy API key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Install the requests module for python. | |
# pip install requests | |
# 2. Add script arguments in PlexPy. | |
# {server_name} {user} {title} {player} {platform} | |
import requests | |
import sys | |
server_name = sys.argv[1] | |
user = sys.argv[2] |