From 75b4fa3229ca7163ec4d1336a500594577aad719 Mon Sep 17 00:00:00 2001 From: Landon Abney Date: Mon, 18 Jun 2018 13:30:41 -0700 Subject: [PATCH] Add examples for paused streams Add a few examples for usage of the new paused stream functionality. --- killstream/kill_stream.py | 19 ------------------- killstream/readme.md | 27 ++++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/killstream/kill_stream.py b/killstream/kill_stream.py index 480e882..9a26e3f 100644 --- a/killstream/kill_stream.py +++ b/killstream/kill_stream.py @@ -39,25 +39,6 @@ Taultulli > Settings > Notification Agents > New Script > Script Arguments: Save Close - -Examples: - -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 diff --git a/killstream/readme.md b/killstream/readme.md index a428705..5bf0465 100644 --- a/killstream/readme.md +++ b/killstream/readme.md @@ -14,6 +14,31 @@ Arguments: --jbop stream --username {username} --sessionId {session_id} --killMessage Transcoding streams are not allowed. ``` +### Kill non-local streams paused for a long time + +_The default values will kill anything paused for over 20 minutes, checking every 30 seconds._ + +Script Timeout: 0 _**Important!**_ +Triggers: Playback Paused +Conditions: \[ `Stream Local` | `is not` | `1` \] + +Arguments: +``` +--jbop paused --sessionId {session_id} --killMessage Your stream was paused for over 20 minutes and has been automatically stopped for you. +``` + +### Kill streams paused for a custom time + +_This is an example of customizing the paused stream monitoring to check every 15 seconds, and kill any stream paused for over 5 minutes._ + +Script Timeout: 0 _**Important!**_ +Triggers: Playback Paused + +Arguments: +``` +--jbop paused --interval 15 --limit 300 --sessionId {session_id} --killMessage Your stream was paused for over 5 minutes and has been automatically stopped for you. +``` + ### Kill paused transcodes Triggers: Playback Paused @@ -92,7 +117,7 @@ Arguments: ### Kill by hours of the day -Kills any streams during 9 AM to 10 AM +_Kills any streams during 9 AM to 10 AM._ Triggers: Playback Start Conditions: \[ `Timestamp` | `begins with` | `09 or 10` \]