zSeriesGuy / Tautulli

A Python based monitoring and tracking tool for Plex Media Server.
http://tautulli.com
GNU General Public License v3.0
27 stars 9 forks source link

Issue with custom scripts (Tautulli APIv2) #12

Closed prinzpi closed 4 years ago

prinzpi commented 5 years ago

Hi, I'm just facing another issue regarding a custom script: Limit user streams to one unique IP

I'm not sure if this is an issue from Tautulli 3.0.00 or just an issue from the script by it self. But with the master branch this kind of scripts was working when I have used them 2-3 months ago. It seems to be that there is an issue with the APIv2?!

Maybe any ideas how to fix it?

Log:

2019-05-31 14:52:21 ERROR   Tautulli APIv2 :: Failed to run terminate_session with {'message': u'You are only allowed to stream from one location at a time.', 'session_id': u'8c54de381be6fe96-com-plexapp-android'}: terminate_session() takes at least 2 arguments (3 given)
2019-05-31 14:52:21 DEBUG   Tautulli APIv2 :: Cleaned kwargs: {'message': u'You are only allowed to stream from one location at a time.', 'session_id': u'8c54de381be6fe96-com-plexapp-android'}
2019-05-31 14:52:21 DEBUG   Tautulli APIv2 :: API called with kwargs: {'cmd': u'terminate_session', 'message': u'You are only allowed to stream from one location at a time.', 'apikey': u'********b9', 'session_id': u'8c54de381be6fe96-com-plexapp-android'}

Version: Tautulli: 3.0.00 PMS: 1.15.6.1079

Branch: V3.0.00

Operating system:

  1. Server: Ubuntu 16.04.6 LTS
  2. Server: Ubuntu 18.04.2 LTS

Python version: 3.5.2

zSeriesGuy commented 5 years ago

@prinzpi It is failing because the terminate_session method now needs to know WHICH server to terminate the stream on. That script would need to be modified to handle the multiple plex servers changes that I had made. I'll see what I can do with it.

prinzpi commented 5 years ago

@zSeriesGuy ah ok, I understand, makes sense. Would be awesome, but if not: no problem, for sure you are not able to edit all custom scripts. Thanks for the fast information.

zSeriesGuy commented 4 years ago

@prinzpi This issue should now be resolved in the V4.0.00 branch. Note that V4.0.00 is a python3 implementation and is still in testing.