Updated instructions and added more scripts
18
Custom-Scripts-for-PlexPy.md
Normal file
18
Custom-Scripts-for-PlexPy.md
Normal file
@@ -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 |
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
```
|
|
||||||
import sys
|
|
||||||
import requests
|
|
||||||
|
|
||||||
# sys.argv[1] is the first argument
|
|
||||||
# sys.argv[2] is the second argument etc
|
|
||||||
|
|
||||||
USERID = '<numeric ID from @IDBot>'
|
|
||||||
KEY= '<the API key from @BotFather>'
|
|
||||||
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) |
|
|
||||||
| | | | |
|
|
||||||
Reference in New Issue
Block a user