Cleanup format of examples

Cleans up the examples to all have a standard format that covers all
required settings and gives example messages where appropriate.
This commit is contained in:
Landon Abney 2018-06-18 13:22:40 -07:00
parent 7b07bb314f
commit c976a3dfb1
No known key found for this signature in database
GPG Key ID: 4414384AEEE3FB2B
2 changed files with 109 additions and 61 deletions

View File

@ -42,22 +42,6 @@ Taultulli > Settings > Notification Agents > New Script > Script Arguments:
Examples: Examples:
Kill any transcoding streams
Script Timeout: 30 (default)
Triggers: Playback Start
Conditions: Transcode Decision is transcode
Arguments (Playback Start): --jbop stream --sessionId {session_id}
--username {username}
--killMessage Transcoding streams are not allowed on this server.
Kill all streams started by a specific user
Script Timeout: 30 (default)
Triggers: Playback Start
Conditions: Username is Bob
Arguments (Playback Start): --jbop allStreams --userId {user_id}
--username {username}
--killMessage Hey Bob, we need to talk!
Kill all WAN streams paused longer than 20 minutes, checking every 30 seconds Kill all WAN streams paused longer than 20 minutes, checking every 30 seconds
Script Timeout: 0 Script Timeout: 0
Triggers: Playback Pause Triggers: Playback Pause

View File

@ -1,77 +1,141 @@
## README # README
Killing streams is a Plex Pass only feature. So these scripts will only work for Plex Pass users. Killing streams is a Plex Pass only feature. So these scripts will **only** work for Plex Pass users.
## `kill_stream.py` examples:
### Kill_stream.py examples: ### Kill transcodes
#### Arguments examples: Triggers: Playback Start
Conditions: \[ `Transcode Decision` | `is` | `transcode` \]
Kill the one offending stream with a custom message and send notification to notification agent ID 1 Arguments:
```
--jbop stream --username {username} --sessionId {session_id} --killMessage Transcoding streams are not allowed.
```
--jbop stream --userId {user_id} --username {username} --sessionId {session_id} --killMessage You did something wrong. --notify 1 ### Kill paused transcodes
Kill all the offending user's streams with a custom message and send notification to notification agent ID 1 Triggers: Playback Paused
Conditions: \[ `Transcode Decision` | `is` | `transcode` \]
--jbop allStreams --userId {user_id} --username {username} --sessionId {session_id} --killMessage You did something wrong. --notify 1 Arguments:
```
--jbop stream --username {username} --sessionId {session_id} --killMessage Paused streams are automatically stopped.
```
Kill the one offending stream with default message ### Limit User stream count, kill last stream
--jbop stream --userId {user_id} --username {username} --sessionId {session_id} Triggers: Playback Start
Conditions: \[ `User Streams` | `is greater than` | `3` \]
Arguments:
```
--jbop stream --username {username} --sessionId {session_id} --killMessage You are only allowed 3 streams.
```
#### Condition Examples: ### IP Whitelist
Kill transcodes: Triggers: Playback Start
Conditions: \[ `IP Address` | `is not` | `192.168.0.100 or 192.168.0.101` \]
Set Trigger: Playback Start Arguments:
Set Conditions: [ {Transcode Decision} | {is} | {transcode} ] ```
--jbop stream --username {username} --sessionId {session_id} --killMessage {ip_address} is not allowed to access {server_name}.
```
Kill paused transcodes: ### Kill by platform
Set Trigger: Playback Paused Triggers: Playback Start
Set Conditions: [ {Transcode Decision} | {is} | {transcode} ] Conditions: \[ `Platform` | `is` | `Roku or Android` \]
Limit User stream count, kill last stream: Arguments:
```
--jbop stream --username {username} --sessionId {session_id} --killMessage {platform} is not allowed on {server_name}.
```
Set Trigger: Playback Start ### Kill transcode by library
Set Conditions: [ {User Streams} | {is greater than} | {3} ]
IP Whitelist: Triggers: Playback Start
Conditions:
* \[ `Transcode Decision` | `is` | `transcode` \]
* \[ `Library Name` | `is` | `4K Movies` \]
Set Trigger: Playback Start Arguments:
Set Conditions: [ {IP Address} | {is not} | {192.168.0.100 or 192.168.0.101} ] ```
--jbop stream --username {username} --sessionId {session_id} --killMessage Transcoding streams are not allowed from the 4K Movies library.
```
Kill by platform: ### Kill transcode by original resolution
Set Trigger: Playback Start Triggers: Playback Start
Set Conditions: [ {Platform} | {is} | {Roku or Android} ] Conditions:
* \[ `Transcode Decision` | `is` | `transcode` \]
* \[ `Video Resolution` | `is` | `1080 or 720`\]
Kill transcode by library: Arguments:
```
--jbop stream --username {username} --sessionId {session_id} --killMessage Transcoding streams are not allowed for {stream_video_resolution}p streams.
```
Set Trigger: Playback Start ### Kill transcode by bitrate
Set Conditions: [ {Transcode Decision} | {is} | {transcode} ]
[ {Library Name} | {is} | {4K Movies} ]
Kill transcode by original resolution: Triggers: Playback Start
Conditions:
* \[ `Transcode Decision` | `is` | `transcode` \]
* \[ `Bitrate` | `is greater than` | `4000` \]
Set Trigger: Playback Start Arguments:
Set Conditions: [ {Transcode Decision} | {is} | {transcode} ] ```
[ {Video Resolution} | {is} | {1080 or 720}] --jbop stream --username {username} --sessionId {session_id} --killMessage Transcoding streams are not allowed from over 4 Mbps (Yours: {stream_bitrate}).
```
Kill transcode by bitrate: ### Kill by hours of the day
Set Trigger: Playback Start Kills any streams during 9 AM to 10 AM
Set Conditions: [ {Transcode Decision} | {is} | {transcode} ]
[ {Bitrate} | {is greater than} | {4000} ]
Kill by hours of the day: Triggers: Playback Start
Conditions: \[ `Timestamp` | `begins with` | `09 or 10` \]
Arguments:
```
--jbop stream --username {username} --sessionId {session_id} --killMessage {server_name} is unavailable between 9 and 10 AM.
```
Set Trigger: Playback Start ### Kill non local streams
Set Conditions: [ {Timestamp} | {begins with} | {09 or 10} ]
# Killing any streams from 9 AM to 11 AM
Kill non local streams: Triggers: Playback Start
Conditions: \[ `Stream Local` | `is not` | `1` \]
Arguments:
```
--jbop stream --username {username} --sessionId {session_id} --killMessage {server_name} only allows local streams.
```
Set Trigger: Playback Start ### Kill transcodes and send a notification to agent 1
Set Conditions: [ {Stream location} | {is not} | {lan} ]
Triggers: Playback Start
Conditions: \[ `Transcode Decision` | `is` | `transcode` \]
Arguments:
```
--jbop stream --username {username} --sessionId {session_id} --notify 1 --killMessage Transcoding streams are not allowed.
```
### Kill transcodes using the default message
Triggers: Playback Start
Conditions: \[ `Transcode Decision` | `is` | `transcode` \]
Arguments:
```
--jbop stream --username {username} --sessionId {session_id}
```
### Kill all of a user's streams with notification
Triggers: Playback Start
Conditions: \[ `Username` | `is` | `Bob` \]
Arguments:
```
--jbop allStreams --userId {user_id} --notify 1 --killMessage Hey Bob, we need to talk!
```