shebang and spacing

This commit is contained in:
Blacktwin 2018-08-23 06:43:34 -04:00
parent ce8f3838c0
commit 0c0ee06125

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python
"""
Share functions from https://gist.github.com/JonnyWong16/f8139216e2748cb367558070c1448636
@ -120,6 +121,7 @@ class Activity(object):
self.transcode_key = d['transcode_key']
self.state = d['state']
class Users(object):
def __init__(self, data=None):
d = data or {}
@ -127,6 +129,7 @@ class Users(object):
self.user_id = d['user_id']
self.friendly_name = d['friendly_name']
def get_user(user_id):
# Get the user list from Tautulli.
payload = {'apikey': TAUTULLI_APIKEY,
@ -165,6 +168,7 @@ def get_history(user_id, bankey):
except Exception as e:
sys.stderr.write("Tautulli API 'get_history' request failed: {0}.".format(e))
def share(user_id, ban):
headers = {"X-Plex-Token": PLEX_TOKEN,
@ -198,6 +202,7 @@ def share(user_id, ban):
return
def unshare(user_id):
headers = {"X-Plex-Token": PLEX_TOKEN,
@ -236,6 +241,7 @@ def unshare(user_id):
return
def get_activity():
# Get the user IP list from Tautulli
payload = {'apikey': TAUTULLI_APIKEY,