JBOPS/killstream
Landon Abney 342284173b
Use the same session for all requests
Use the Session created at the start of the script for all requests, 
instead of creating a new one for some of them (which doesn't inherit 
the settings set on it at the start).
2018-06-16 23:51:53 -07:00
..
kill_else_if_buffering.py PlexPy names to tautulli. Agent_id to notifier_id. 2018-03-29 09:48:21 -04:00
kill_stream.py Use the same session for all requests 2018-06-16 23:51:53 -07:00
kill_time.py more messaging, moved episode check to conditions, correction for 0 watched history for the day. 2018-06-12 09:55:13 -04:00
play_limit.py PlexPy names to tautulli. Agent_id to notifier_id. 2018-03-29 09:48:21 -04:00
readme.md headers for arg and cond examples. 2018-06-15 08:40:02 -04:00
time_limit.py PlexPy names to tautulli. Agent_id to notifier_id. 2018-03-29 09:48:21 -04:00
wait_kill_paused_notify.py Add wait_kill_pause_notify from samwiseg00 2018-03-29 09:49:28 -04:00
watch_limit.py PlexPy names to tautulli. Agent_id to notifier_id. 2018-03-29 09:48:21 -04:00

README

Killing streams is a Plex Pass only feature. So these scripts will only work for Plex Pass users.

Kill_stream.py examples:

Arguments examples:

Kill the one offending stream with a custom message and send notification to notfication agent ID 1

--jbop stream --userId {user_id} --username {username} --sessionId {session_id} --killMessage You did something wrong. --notify 1

Kill all the offending users streams with a custom message and send notification to notfication agent ID 1

--jbop allStreams --userId {user_id} --username {username} --sessionId {session_id} --killMessage You did something wrong. --notify 1

Kill the one offending stream with default message

--jbop stream --userId {user_id} --username {username} --sessionId {session_id}

Condition Examples:

Kill transcodes:

Set Trigger: Playback Start
Set Conditions: [ {Transcode Decision} | {is} | {transcode} ]

Kill paused transcodes:

Set Trigger: Playback Paused
Set Conditions: [ {Transcode Decision} | {is} | {transcode} ]

Limit User stream count, kill last stream:

Set Trigger: Playback Start
Set Conditions: [ {User Streams} | {is greater than} | {3} ]

IP Whitelist:

Set Trigger: Playback Start
Set Conditions: [ {IP Address} | {is not} | {192.168.0.100 or 192.168.0.101} ]

Kill by platform:

Set Trigger: Playback Start
Set Conditions: [ {Platform} | {is} | {Roku or Android} ]

Kill transcode by library:

Set Trigger: Playback Start
Set Conditions: [ {Transcode Decision} | {is} | {transcode} ]
            [ {Library Name} | {is} | {4K Movies} ]

Kill transcode by original resolution:

Set Trigger: Playback Start
Set Conditions: [ {Transcode Decision} | {is} | {transcode} ]
                [ {Video Resolution} | {is} | {1080 or 720}]

Kill transcode by bitrate:

Set Trigger: Playback Start
Set Conditions: [ {Transcode Decision} | {is} | {transcode} ]
                [ {Bitrate} | {is greater than} | {4000} ]

Kill by hours of the day:

Set Trigger: Playback Start
Set Conditions: [ {Timestamp} | {begins with} | {09 or 10} ]
# Killing any streams from 9am to 11am

Kill non local streams:

Set Trigger: Playback Start
Set Conditions: [ {Stream location} | {is} | {wan} ]
or
Set Conditions: [ {Stream location} | {is not} | {lan} ]