From 2b5a125ae3fe89e57941a5ef456ed71ea3a4b8a0 Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Fri, 6 Oct 2023 19:44:49 -0400 Subject: [PATCH] Fix sonarr manual import method According to Sonarr's docs (https://sonarr.tv/docs/api/#/ManualImport/post_api_v3_manualimport), this is supposed to be a POST method --- pyarr/sonarr.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyarr/sonarr.py b/pyarr/sonarr.py index f0ce53d..fcc3068 100644 --- a/pyarr/sonarr.py +++ b/pyarr/sonarr.py @@ -735,17 +735,17 @@ def get_manual_import( return self._get("manualimport", self.ver_uri, params=params) - # PUT /manualimport - def upd_manual_import(self, data: JsonObject) -> JsonObject: - """Update a manual import + # POST /manualimport + def add_manual_import(self, data: JsonArray) -> JsonArray: + """Add a manual import Note: To be used in conjunction with get_manual_import() Args: - data (JsonObject): Data containing changes + data (JsonArray): Data for the import Returns: - JsonObject: Dictionary of updated record + JsonArray: Array of dicts of the new imports """ - return self._put("manualimport", self.ver_uri, data=data) + return self._post("manualimport", self.ver_uri, data=data)