sonarr token from envavr

This commit is contained in:
Karl 2024-01-08 09:22:21 +00:00
parent 4cc5c3e39e
commit 69a555a658

View File

@ -1,6 +1,7 @@
import requests import requests
import json import json
import os
token = os.getenv('sonarr_token')
def update_show_in_soarr(show_id): def update_show_in_soarr(show_id):
url = "http://192.168.4.9:8989/api/v3/command" url = "http://192.168.4.9:8989/api/v3/command"
@ -11,7 +12,7 @@ def update_show_in_soarr(show_id):
}) })
headers = { headers = {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'X-Api-Key': 'f6ea49a75a44469daec03969bdf6764d', 'X-Api-Key': token,
} }
response = requests.request("POST", url, headers=headers, data=payload) response = requests.request("POST", url, headers=headers, data=payload)