This commit is contained in:
deathbybandaid 2023-01-06 12:37:50 -05:00
parent c58e6b9223
commit 3760cccf1b

View File

@ -44,11 +44,12 @@ def main():
logwrite = open(log_file, 'a') logwrite = open(log_file, 'a')
if "sonarr_eventtype" in os.environ: if "sonarr_eventtype" in os.environ:
logwrite.write("Recieved Event from Sonarr\n") arr_type = "sonarr"
ENV_FILE = os.path.join(SCRIPT_DIR, "env_sonarr")
elif "radarr_eventtype" in os.environ: elif "radarr_eventtype" in os.environ:
logwrite.write("Recieved Event from Sonarr\n") arr_type = "radarr"
ENV_FILE = os.path.join(SCRIPT_DIR, "env_radarr") logwrite.write("Recieved Event from %s\n" % arr_type)
ENV_FILE = os.path.join(SCRIPT_DIR, "env_%s" % arr_type)
envs = {} envs = {}