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