blacktwin / JBOPS

Just a Bunch Of Plex Scripts
1.66k stars 308 forks source link

Script Triggered but Stream not Killed #147

Closed gituser765 closed 5 years ago

gituser765 commented 5 years ago

Hi

I am having trouble getting kill_stream.py to work properly. I have Plex Pass and can kill streams via Tautulli but for some reason the notification isn't killing streams. here are the relevant sections from the logs

2019-03-09 17:26:34 - DEBUG   :: Thread-38 : Tautulli ActivityHandler :: Session 28 buffer count is 1.
2019-03-09 17:26:34 - DEBUG   :: Thread-38 : Tautulli ActivityHandler :: Session 28 has changed transcode decision.
2019-03-09 17:26:34 - DEBUG   :: Thread-1 : Tautulli NotificationHandler :: Checking custom notification conditions for notifier_id 7.
2019-03-09 17:26:34 - DEBUG   :: Thread-1 : Tautulli NotificationHandler :: Custom condition evaluated to 'True'. Conditions: [True].
2019-03-09 17:26:34 - INFO    :: Thread-1 : Tautulli NotificationHandler :: Preparing notification for notifier_id 7.
2019-03-09 17:26:34 - DEBUG   :: Thread-1 : Tautulli Notifiers :: Trying to run notify script, action: change, arguments: [u'--jbop', u'stream', u'--debug', u'--username', u'dummyID', u'--sessionId', u'd52c23b44e22796f-com-plexapp-android', u'--killMessage', u'Transcoding streams are not allowed.']
2019-03-09 17:26:34 - DEBUG   :: Thread-1 : Tautulli Notifiers :: Full script is: ['python', 'C:\\Users\\ServerPC\\Documents\\PlexPyInstall\\Scripts\\kill_stream.py', '--jbop', 'stream', '--debug', '--username', 'dummyID', '--sessionId', 'd52c23b44e22796f-com-plexapp-android', '--killMessage', 'Transcoding streams are not allowed.']
2019-03-09 17:26:34 - DEBUG   :: Thread-1 : Tautulli Notifiers :: Executing script in a new thread.
2019-03-09 17:26:39 - DEBUG   :: Thread-103 : Tautulli Notifiers :: Script returned: 
  Tautulli URL - http://localhost:8181
  Tautulli Public URL - /
  Verify SSL - False
  Tautulli API key - xxxxxxxxxxxxxxxxxxxxxxxxxxxxcfa0
  Successfully called Tautulli API cmd 'terminate_session'
2019-03-09 17:26:39 - INFO    :: Thread-103 : Tautulli Notifiers :: Script notification sent.
2019-03-09 17:26:44 - DEBUG   :: Thread-38 : Tautulli ActivityHandler :: Session 28 is buffering.
2019-03-09 17:26:44 - DEBUG   :: Thread-38 : Tautulli ActivityHandler :: Session 28 buffer count is 2.
blacktwin commented 5 years ago

What is the client player? Some players will completely ignore the termination call. Double check that you can kill this player's stream from Plex or Tautulli (X in the stream info card).

Was the stream a sync session? Plex will report a sync session's info if the player has an internet connection. You cannot kill a sync session.

Full logs would be better.

How to Find Your Logs

View the Tautulli logs by clicking on "View Logs" in the settings menu. Click the "Download logs" button to save a copy of the log file. If Tautulli is unable to start, then the tautulli.log file is located in the logs folder where Tautulli is installed. Paste the logs on Gist and post the link here, do not upload the file as an attachment.

gituser765 commented 5 years ago

Thanks for getting back to me, the client was the Android TV app which I tested and was able to kill from Tautulli. This was not a sync session either.

I was just poking around after I grabbed the logs and fixed it though!

Under settings > Web Interface I had to enable API which was disabled for some reason.