From 2d4a62062606cd6768f8b149bf5882e1937b6662 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Fri, 6 Jan 2023 12:25:46 -0500 Subject: [PATCH] test --- tdarr_inform.py | 7 ++++++- tdarr_inform.sh | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) delete mode 100644 tdarr_inform.sh diff --git a/tdarr_inform.py b/tdarr_inform.py index 228fcd2..8027b26 100644 --- a/tdarr_inform.py +++ b/tdarr_inform.py @@ -39,14 +39,19 @@ from sys import argv def main(): SCRIPT_PATH = os.path.realpath(__file__) SCRIPT_DIR = os.path.dirname(SCRIPT_PATH) + log_file = os.path.join(SCRIPT_DIR, "testlog.log") - # ENV_FILE = f"{SCRIPT_DIR}\\ARR_ENV.txt" logwrite = open(log_file, 'a') + if "sonarr_eventtype" in os.environ: + logwrite.write("Recieved Event from Sonarr") + logwrite.write("argv %s\n" % argv) logwrite.close() + # ENV_FILE = f"{SCRIPT_DIR}\\ARR_ENV.txt" + # envs = {} # Checking all potentiall environment variables diff --git a/tdarr_inform.sh b/tdarr_inform.sh deleted file mode 100644 index d9a8d14..0000000 --- a/tdarr_inform.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -/usr/bin/python3 /opt/arr_to_tdarr/tdarr_inform.py