From 0c0ee06125c0be1abe01a532d3787b46318582c6 Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Thu, 23 Aug 2018 06:43:34 -0400 Subject: [PATCH] shebang and spacing --- utility/stream_limiter_ban_email.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utility/stream_limiter_ban_email.py b/utility/stream_limiter_ban_email.py index 6e48440..e02cc6c 100644 --- a/utility/stream_limiter_ban_email.py +++ b/utility/stream_limiter_ban_email.py @@ -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,