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
from plexapi.server import PlexServer | |
import requests | |
# Edit these | |
PLEX_URL = '' | |
PLEX_TOKEN = '' | |
# | |
sess = requests.Session() | |
sess.verify = False |
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
{ | |
"meta" : { | |
"view" : { | |
"id" : "66i6-hisz", | |
"name" : "Botulism", | |
"attribution" : "Division of Foodborne, Waterborne, and Environmental Diseases", | |
"attributionLink" : "https://www.cdc.gov/botulism/surveillance.html", | |
"averageRating" : 0, | |
"category" : "Foodborne, Waterborne, and Related Diseases", | |
"createdAt" : 1558625323, |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Description: Sync Plex playlists to shared users. | |
# Author: /u/SwiftPanda16 | |
# Requires: plexapi, requests, xmltodict | |
import requests | |
import xmltodict |
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
# pip install plexapi | |
from plexapi.server import PlexServer | |
import random | |
### Edit Settings ### | |
PLEX_URL = 'http://localhost:32400' | |
TOKEN = 'xxxx' | |
MUSIC_LIBRARY = 'Music' | |
PLAYLIST_TITLE = 'Random Album Playlist' |
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 platform | |
from uuid import getnode | |
import sys | |
# PlexPy argument {rating_key} | |
## EDIT THESE SETTINGS ## | |
PLEX_HOST = '127.0.0.1' |
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 pull last IP address from user and add to List of IP addresses and networks that are allowed without auth in Plex. | |
optional arguments: | |
-h, --help show this help message and exit | |
-u [ ...], --users [ ...] | |
Space separated list of case sensitive names to process. Allowed names are: | |
(choices: {List of all Plex users} ) | |
(default: None) | |
-c [], --clear [] Clear List of IP addresses and networks that are allowed without auth in Plex: |
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
from plexapi.server import PlexServer | |
PLEX_URL = 'http://localhost:32400' | |
PLEX_TOKEN = 'xxxxx' | |
plex = PlexServer(PLEX_URL, PLEX_TOKEN) | |
sections = plex.library.sections() | |
titles = [titles for libraries in sections for titles in libraries.search('star')] | |
for title in titles: | |
try: |
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. | |
Uses: | |
notify_added_lastweek.py -t poster -d 1 -u all -i user1 user2 -s 250 100 | |
# email all users expect user1 & user2 what was added in the last day using posters that are 250x100 | |
notify_added_lastweek.py -t poster -d 7 -u all | |
# email all users what was added in the last 7 days(week) using posters that are default sized |
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
''' | |
kill_transcode function from https://gist.github.com/Hellowlol/ee47b6534410b1880e19 | |
PlexPy > Settings > Notification Agents > Scripts > Bell icon: | |
[X] Notify on pause | |
PlexPy > Settings > Notification Agents > Scripts > Gear icon: | |
Playback Pause: create_wait_kill_trans.py | |
PlexPy > Settings > Notifications > Script > Script Arguments: | |
{session_key} |
NewerOlder