Destroyed External Scripts (experimental) (markdown)
@@ -1,19 +0,0 @@
|
||||
To enable scripts, set a Script Folder at Settings > Notification Agents > Scripts. Place any script files in this directory with appropriate permissions (executable and accessible to the PlexPy user).
|
||||
|
||||
For this video transcode alert script, you should select the script for action types where it would be useful: Playback Start and Playback Resume, for example. Under Settings > Notifications > Scripts, set the parameters that should get passed to the script.
|
||||
|
||||
|
||||
#!/bin/sh
|
||||
## Telegram notification basic script
|
||||
### Based on Matriphe's at https://gist.github.com/matriphe/9a51169508f266d97313
|
||||
#script parameters: {video_decision} {user} {title} {player} {platform}
|
||||
USERID="<numeric ID from @IDBot>"
|
||||
KEY="<the API key from @BotFather>"
|
||||
TIMEOUT="10"
|
||||
URL="https://api.telegram.org/bot$KEY/sendMessage"
|
||||
TEXT="$2 is playing $3 on device $4 ($5) $1"
|
||||
#Something like: Username is playing Movie Name on device My Device (Android) Transcode
|
||||
|
||||
if [ "$1" != "Direct Play" ] && [ "$1" != "Copy" ]; then
|
||||
curl -s --max-time $TIMEOUT -d "chat_id=$USERID&disable_web_page_preview=1&text=$TEXT" $URL > /dev/null
|
||||
fi
|
Reference in New Issue
Block a user