mirror of
https://github.com/blacktwin/JBOPS.git
synced 2025-12-15 12:45:36 +00:00
Cleanup documentation and add examples
Cleanup the documentation on how to set it up to match the current Tautulli state. Add a few examples to give people ideas for how to use this script.
This commit is contained in:
parent
c03860ec70
commit
98b72f0a62
@ -3,21 +3,23 @@ Description: Use conditions to kill a stream
|
||||
Author: Blacktwin
|
||||
Requires: requests
|
||||
|
||||
Enabling Scripts in Tautulli:
|
||||
Taultulli > Settings > Notification Agents > Add a Notification Agent > Script
|
||||
Adding the script to Tautulli:
|
||||
Taultulli > Settings > Notification Agents > Add a new notification agent >
|
||||
Script
|
||||
|
||||
Configuration:
|
||||
Taultulli > Settings > Notification Agents > New Script > Configuration:
|
||||
|
||||
Script Name: kill_stream
|
||||
Set Script Timeout: {timeout}
|
||||
Script Folder: /path/to/your/scripts
|
||||
Script File: ./kill_stream.py (Should be selectable in a dropdown list)
|
||||
Script Timeout: {timeout}
|
||||
Description: Kill stream(s)
|
||||
Save
|
||||
|
||||
Triggers:
|
||||
Taultulli > Settings > Notification Agents > New Script > Triggers:
|
||||
|
||||
Check: {trigger}
|
||||
Check: Playback Start and/or Playback Pause
|
||||
Save
|
||||
|
||||
Conditions:
|
||||
@ -38,6 +40,40 @@ Taultulli > Settings > Notification Agents > New Script > Script Arguments:
|
||||
Save
|
||||
Close
|
||||
|
||||
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
|
||||
Script Timeout: 0
|
||||
Triggers: Playback Pause
|
||||
Conditions: Stream Location is not LAN
|
||||
Arguments (Playback Start): --jbop paused --sessionId {session_id}
|
||||
--limit 1200 --interval 30
|
||||
--killMessage Your stream was paused for over 20 minutes and has been
|
||||
automatically stopped for you.
|
||||
|
||||
Notes:
|
||||
* Any of these can have "--notify X" added to them, where X is the
|
||||
ID shown in Tautulli for a Notification agent, if specified it will send a
|
||||
message there when a stream is terminated.
|
||||
* Arguments should all be on one line in Tautulli, they are split here for
|
||||
easier reading.
|
||||
|
||||
"""
|
||||
|
||||
import requests
|
||||
|
||||
Loading…
Reference in New Issue
Block a user