test
This commit is contained in:
parent
87aa0df10e
commit
83f6952414
@ -41,8 +41,13 @@ def main():
|
|||||||
arr_event_type = os.environ["radarr_eventtype"]
|
arr_event_type = os.environ["radarr_eventtype"]
|
||||||
arr_file_path_key = "radarr_moviefile_path"
|
arr_file_path_key = "radarr_moviefile_path"
|
||||||
else:
|
else:
|
||||||
loggit("Could not Detect Radarr or Sonarr", True)
|
# loggit("Could not Detect Radarr or Sonarr", True)
|
||||||
sys.exit(0)
|
# sys.exit(0)
|
||||||
|
|
||||||
|
arr_type = "sonarr"
|
||||||
|
arr_event_type = "Download"
|
||||||
|
arr_file_path_key = "sonarr_episodefile_path"
|
||||||
|
print(arr_file_path_key)
|
||||||
|
|
||||||
loggit("tdarr_inform Recieved %s Event from %s\n" % (arr_event_type, arr_type))
|
loggit("tdarr_inform Recieved %s Event from %s\n" % (arr_event_type, arr_type))
|
||||||
|
|
||||||
@ -50,17 +55,26 @@ def main():
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
elif arr_event_type not in ["Download", "Rename"]:
|
elif arr_event_type not in ["Download", "Rename"]:
|
||||||
|
# TODO rename sonarr_series_path
|
||||||
|
# radarr_moviefile_paths split |
|
||||||
|
# radarr_moviefile_previouspaths
|
||||||
|
|
||||||
|
# TODO Delete
|
||||||
|
# sonarr_series_path
|
||||||
|
# radarr_deletedpaths
|
||||||
loggit("%s is not a supported tdarr_inform Event." % arr_event_type, True)
|
loggit("%s is not a supported tdarr_inform Event." % arr_event_type, True)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
if arr_file_path_key not in os.environ:
|
# if arr_file_path_key not in os.environ:
|
||||||
loggit("%s Environment variable was missing." % arr_file_path_key, True)
|
# loggit("%s Environment variable was missing." % arr_file_path_key, True)
|
||||||
sys.exit(1)
|
# sys.exit(1)
|
||||||
arr_file_path = os.environ[arr_file_path_key]
|
# arr_file_path = os.environ[arr_file_path_key]
|
||||||
|
arr_file_path = "/Drivepool/Media/TV/Cartoons/Ben 10 (2016)/Season 2/Ben 10 (2016) - S02E31 - Chicken Nuggets of Wisdom.mkv"
|
||||||
loggit("Found %s\n" % arr_file_path)
|
loggit("Found %s\n" % arr_file_path)
|
||||||
|
|
||||||
loggit("Preparing payload to POST to tdarr API\n")
|
loggit("Preparing payload to POST to tdarr API\n")
|
||||||
|
|
||||||
|
"""
|
||||||
payload = {
|
payload = {
|
||||||
"data": {
|
"data": {
|
||||||
"scanConfig": {
|
"scanConfig": {
|
||||||
@ -72,9 +86,10 @@ def main():
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
headers = {"content-type": "application/json"}
|
"""
|
||||||
response = requests.post(script_settings["tdarr"]["url"], json=payload, headers=headers)
|
# headers = {"content-type": "application/json"}
|
||||||
loggit("Tdarr response: %s\n" % response)
|
# response = requests.post(script_settings["tdarr"]["url"], json=payload, headers=headers)
|
||||||
|
# loggit("Tdarr response: %s\n" % response)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user