From 91a58e66add6c9278c19eb50003061374a387304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=CC=81da=CC=81m=20Kocsis?= Date: Fri, 4 Mar 2022 09:12:54 +0100 Subject: [PATCH] Fixes the filename of the main python script to match what is in the README. Adds the pytrakt.json to avoid error for first run. Changes the path of pytrakt.json to the working directory instead of home folder. --- TimeToTrackt.py => TimeToTrakt.py | 2 +- pytrakt.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) rename TimeToTrackt.py => TimeToTrakt.py (99%) create mode 100644 pytrakt.json diff --git a/TimeToTrackt.py b/TimeToTrakt.py similarity index 99% rename from TimeToTrackt.py rename to TimeToTrakt.py index f8c7cfb..a1f8b6c 100644 --- a/TimeToTrackt.py +++ b/TimeToTrakt.py @@ -36,7 +36,7 @@ class Expando(object): def isAuthenticated(): - with open(f"{Path.home()}/.pytrakt.json") as f: + with open("pytrakt.json") as f: data = json.load(f) daysBeforeExpiration = ( datetime.fromtimestamp(data["OAUTH_EXPIRES_AT"]) - datetime.now() diff --git a/pytrakt.json b/pytrakt.json new file mode 100644 index 0000000..574eedb --- /dev/null +++ b/pytrakt.json @@ -0,0 +1,3 @@ +{ + "OAUTH_EXPIRES_AT": 0 +} \ No newline at end of file