Add delay to kill stream script
This commit is contained in:
parent
e097a07ca5
commit
4961e33a8e
@ -592,6 +592,8 @@ if __name__ == "__main__":
|
||||
help='Poster URL of the media')
|
||||
parser.add_argument('--richColor', type=arg_decoding,
|
||||
help='Color of the rich message')
|
||||
parser.add_argument('--delay', type=int, default=0,
|
||||
help='Delay in seconds before killing the stream.')
|
||||
parser.add_argument("--debug", action='store_true',
|
||||
help='Enable debug messages.')
|
||||
|
||||
@ -623,6 +625,9 @@ if __name__ == "__main__":
|
||||
else:
|
||||
kill_message = 'The server owner has ended the stream.'
|
||||
|
||||
if opts.delay:
|
||||
time.sleep(opts.delay)
|
||||
|
||||
if opts.jbop == 'stream':
|
||||
tautulli_stream.terminate(kill_message)
|
||||
notify(opts, kill_message, 'Stream', tautulli_stream, tautulli_server)
|
||||
|
@ -185,6 +185,21 @@ Arguments:
|
||||
--jbop stream --username {username} --sessionId {session_id}
|
||||
```
|
||||
|
||||
### Kill transcodes with a delay
|
||||
|
||||
_This will wait 10 seconds before killing the stream._
|
||||
|
||||
Triggers:
|
||||
* Playback Start
|
||||
* Transcode Decision Change
|
||||
|
||||
Conditions: \[ `Transcode Decision` | `is` | `transcode` \]
|
||||
|
||||
Arguments:
|
||||
```
|
||||
--jbop stream --username {username} --sessionId {session_id} --killMessage 'Transcoding streams are not allowed.' --delay 10
|
||||
```
|
||||
|
||||
### Kill all of a user's streams with notification
|
||||
|
||||
Triggers: Playback Start
|
||||
|
Loading…
Reference in New Issue
Block a user