mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[153] update notifiarr endpoint
This commit is contained in:
parent
3f26695089
commit
c02659869a
2 changed files with 4 additions and 4 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.17.3-develop152
|
1.17.3-develop153
|
||||||
|
|
|
@ -16,8 +16,8 @@ class Notifiarr:
|
||||||
self.test = params["test"]
|
self.test = params["test"]
|
||||||
logger.secret(self.apikey)
|
logger.secret(self.apikey)
|
||||||
logger.debug(f"Environment: {'Test' if self.test else 'Develop' if self.develop else 'Production'}")
|
logger.debug(f"Environment: {'Test' if self.test else 'Develop' if self.develop else 'Production'}")
|
||||||
url, _ = self.get_url("user/validate/")
|
url, _ = self.get_url("user/pmm/")
|
||||||
response = self.config.get(url)
|
response = self.config.get(url, params={"fetch": "settings"})
|
||||||
try:
|
try:
|
||||||
response_json = response.json()
|
response_json = response.json()
|
||||||
except JSONDecodeError as e:
|
except JSONDecodeError as e:
|
||||||
|
@ -26,7 +26,7 @@ class Notifiarr:
|
||||||
if response.status_code >= 400 or ("result" in response_json and response_json["result"] == "error"):
|
if response.status_code >= 400 or ("result" in response_json and response_json["result"] == "error"):
|
||||||
logger.debug(f"Response: {response_json}")
|
logger.debug(f"Response: {response_json}")
|
||||||
raise Failed(f"({response.status_code} [{response.reason}]) {response_json}")
|
raise Failed(f"({response.status_code} [{response.reason}]) {response_json}")
|
||||||
if not params["test"] and not response_json["details"]["response"]:
|
if not self.test and not response_json["details"]["response"]:
|
||||||
raise Failed("Notifiarr Error: Invalid apikey")
|
raise Failed("Notifiarr Error: Invalid apikey")
|
||||||
|
|
||||||
def get_url(self, path):
|
def get_url(self, path):
|
||||||
|
|
Loading…
Reference in a new issue