From cc8cb954e211d2f24c2f802fc8fd4eb8651c7798 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Mon, 21 Mar 2016 11:02:26 -0700 Subject: [PATCH] Updated instructions and added more scripts --- Custom-Scripts-for-PlexPy.md | 18 ++++++++++++++++++ Example-script-python.md | 22 ---------------------- 2 files changed, 18 insertions(+), 22 deletions(-) create mode 100644 Custom-Scripts-for-PlexPy.md delete mode 100644 Example-script-python.md diff --git a/Custom-Scripts-for-PlexPy.md b/Custom-Scripts-for-PlexPy.md new file mode 100644 index 0000000..25e6d43 --- /dev/null +++ b/Custom-Scripts-for-PlexPy.md @@ -0,0 +1,18 @@ +#####How to Use Custom Scripts + +1. Set a "Script Folder" at Settings > Notification Agents > Scripts > Gear Icon. Place any script files in this directory with appropriate permissions (executable and accessible to the PlexPy user). +2. Select the scripts for the actions where you want the script to be triggered (e.g. Playback Start, Playback Stop). +3. Make sure the corresponding action triggers are also enabled under Settings > Notification Agents > Scripts > Bell Icon. +4. Under Settings > Notifications > Scripts, set the arguments that should be passed to the script (e.g. `-si {session_id} -u {user}` + +##### User Created Scripts + +| Description | Language | Author | +| --- | --- | --- | +| [Kill a transcode](https://gist.github.com/Hellowlol/ee47b6534410b1880e19) | Python | Hellowlol | +| [Throttle nzb client](https://gist.github.com/Hellowlol/a5d0cab4bde185b38404) | Python | Hellowlol | +| [Send an Email notification when a specific show is added to Plex](https://gist.github.com/JonnyWong16/2fbd4aeff11bc2452db3) | Python | JonnyWong16| +| [Get notified when Plex disk usage exceeds a certain threshold](https://gist.github.com/JonnyWong16/f561f06a6266db66dad9) | Python | JonnyWong16| +| [Delete PlexPy history older than "X" days](https://gist.github.com/JonnyWong16/cb1b53e71b89d2159313) | Python | JonnyWong16| +| [Get notified on Telegram when a user is transcoding](https://gist.github.com/JonnyWong16/cb1b53e71b89d2159313) | Python | pmow/Hellowlol | +| [Get notified on Telegram when a user is transcoding](https://gist.github.com/JonnyWong16/3591d1fee289daaafeb8) | Bash | pmow | \ No newline at end of file diff --git a/Example-script-python.md b/Example-script-python.md deleted file mode 100644 index 8ee157d..0000000 --- a/Example-script-python.md +++ /dev/null @@ -1,22 +0,0 @@ -``` -import sys -import requests - -# sys.argv[1] is the first argument -# sys.argv[2] is the second argument etc - -USERID = '' -KEY= '' -TIMEOUT= 10 -URL = 'https://api.telegram.org/bot$KEY/sendMessage' -TEXT = 'Crap, your server is transcoding something: ! Go check on it, noob!' -url = URL + chat_id=%s&disable_web_page_preview=1&text=%s % (KEY, TEXT) -if sys.argv[1] != 'Direct Play' and sys.arv[1] != 'Copy': - requests.get(url, timeout=timeout) -``` - -|Description |Language |Author | URL | -|--- |--- |--- |--- | -|Kill a transcode | Python | Hellowlol | [url](https://gist.github.com/Hellowlol/ee47b6534410b1880e19) | -| Throttle nzb client | Python | Hellowlol | [url](https://gist.github.com/Hellowlol/a5d0cab4bde185b38404) | -| | | | | \ No newline at end of file