From bb9b42cae1c5635ed7af27ca002ed4c55244eba4 Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Tue, 1 May 2018 10:52:31 -0400 Subject: [PATCH] grk to int, stopped_time bracket correction. --- killstream/kill_time.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/killstream/kill_time.py b/killstream/kill_time.py index fdf56bc..82eb2df 100644 --- a/killstream/kill_time.py +++ b/killstream/kill_time.py @@ -38,7 +38,7 @@ END_TIME = time(06,00) # 06:00 username = str(sys.argv[1]) media_type = str(sys.argv[2]) -grandparent_rating_key = str(sys.argv[3]) +grandparent_rating_key = int(sys.argv[3]) TODAY = datetime.today().strftime('%Y-%m-%d') @@ -66,7 +66,7 @@ def get_history(username): res_data = response['response']['data']['data'] ep_watched = sum([data['watched_status'] for data in res_data if data['grandparent_rating_key'] == grandparent_rating_key and data['watched_status'] == 1]) - stopped_time = [data['stopped'] for data in res_data if data['watched_status' == 1]] + stopped_time = [data['stopped'] for data in res_data if data['watched_status'] == 1] return [ep_watched, stopped_time[0]] except Exception as e: