Closed stickyfin closed 3 years ago
Can you confirm that you are able to kill the stream via Plex and/or Tautulli? Some clients may not response back to the server properly. That sessionID doesn't look right.
Also with a message like this: "Seems like you have been banned from this server. Please contact admin" you should just unshare or remove them not rely on the script to serve that function.
I able to kill stream from Plex/Tautulli manually. Tautulli Pmsconnect :: Terminating session 393 (session_id 5E00A425-CC43-4A77-A3F6-632B5DA59998).
What do you mean by "That sessionID doesn't look right."?
By removing --killMessage parameter, the script able to kill the stream. I tested by creating another kill_stream script to test. Weird
2021-07-27 21:30:59 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: {1} user | is | 'owner' > 'owner' > True 2021-07-27 21:30:59 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: {2} product | contains | 'ios' > 'plex for ios' > True 2021-07-27 21:30:59 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Condition logic [blank]: {1} and {2} > True 2021-07-27 21:30:59 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Custom conditions evaluated to 'True'. Conditions: [True, True]. 2021-07-27 21:30:59 - INFO :: Thread-2 : Tautulli NotificationHandler :: Preparing notification for notifier_id 12. 2021-07-27 21:30:59 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Notifiers enabled for notify_action 'on_concurrent'. 2021-07-27 21:30:59 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Checking global notification conditions. 2021-07-27 21:31:00 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Global notification conditions evaluated to 'False'. 2021-07-27 21:31:00 - DEBUG :: Thread-2 : Tautulli Notifiers :: Trying to run notify script: /scripts/kill_stream.py, arguments: ['--jbop', 'stream', '--username', 'owner', '--sessionId', '5E00A425-CC43-4A77-A3F6-632B5DA59998'], action: play 2021-07-27 21:31:00 - DEBUG :: Thread-2 : Tautulli Notifiers :: Full script is: ['/usr/local/bin/python', '/scripts/kill_stream.py', '--jbop', 'stream', '--username', 'owner', '--sessionId', '5E00A425-CC43-4A77-A3F6-632B5DA59998'] 2021-07-27 21:31:00 - DEBUG :: Thread-2 : Tautulli Notifiers :: Executing script in a new thread. 2021-07-27 21:31:01 - INFO :: CP Server Thread-5 : Tautulli Pmsconnect :: Terminating session 404 (session_id 5E00A425-CC43-4A77-A3F6-632B5DA59998).
What do you mean by "That sessionID doesn't look right."?
Just me not being familiar with tvOS or iOS. Try the message again but wrapped with "" instead of ''?
Yup I can confirm, substitute single quote with double quote on the --killMessage parameter does make it works.
2021-07-28 12:16:30 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Checking custom notification conditions for notifier_id 12. 2021-07-28 12:16:30 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: {1} user | is | 'owner' > 'owner' > True 2021-07-28 12:16:30 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: {2} product | contains | 'ios' > 'plex for ios' > True 2021-07-28 12:16:30 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Condition logic [blank]: {1} and {2} > True 2021-07-28 12:16:30 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Custom conditions evaluated to 'True'. Conditions: [True, True]. 2021-07-28 12:16:30 - INFO :: Thread-2 : Tautulli NotificationHandler :: Preparing notification for notifier_id 12. 2021-07-28 12:16:30 - DEBUG :: Thread-3 : Tautulli NotificationHandler :: Checking global notification conditions. 2021-07-28 12:16:30 - DEBUG :: Thread-2 : Tautulli Notifiers :: Trying to run notify script: /scripts/kill_stream.py, arguments: ['--jbop', 'stream', '--username', 'owner', '--sessionId', '5E00A425-CC43-4A77-A3F6-632B5DA59998', '--killMessage', 'Testing'], action: play 2021-07-28 12:16:30 - DEBUG :: Thread-2 : Tautulli Notifiers :: Full script is: ['/usr/local/bin/python', '/scripts/kill_stream.py', '--jbop', 'stream', '--username', 'owner', '--sessionId', '5E00A425-CC43-4A77-A3F6-632B5DA59998', '--killMessage', 'Testing'] 2021-07-28 12:16:30 - DEBUG :: Thread-2 : Tautulli Notifiers :: Executing script in a new thread. 2021-07-28 12:16:31 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Notifiers enabled for notify_action 'on_newdevice'. 2021-07-28 12:16:31 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Checking global notification conditions. 2021-07-28 12:16:31 - DEBUG :: Thread-2 : Tautulli NotificationHandler :: Global notification conditions evaluated to 'False'. 2021-07-28 12:16:32 - INFO :: CP Server Thread-5 : Tautulli Pmsconnect :: Terminating session 6 (session_id 5E00A425-CC43-4A77-A3F6-632B5DA59998). 2021-07-28 12:16:32 - DEBUG :: Thread-517 : Tautulli Notifiers :: Subprocess returned with status code 0. 2021-07-28 12:16:32 - INFO :: Thread-517 : Tautulli Notifiers :: Script notification sent.
kill_stream.py not working on iOS/Apple TV. The kill script is working from tautulli log, but user still able to play.
Tautulli logs:
To Reproduce
Steps to reproduce the behavior:
Expected behavior Stream will be killed if the user play. Works on other platform like Windows and Android TV. But not working on iOS and AppleTV.
Screenshots
Desktop (please complete the following information):