fix cache error

This commit is contained in:
meisnate12 2021-11-30 10:18:30 -05:00
parent 7ac8f2fcb5
commit e2f27c14d4
2 changed files with 5 additions and 2 deletions

View file

@ -377,4 +377,4 @@ class Cache:
with sqlite3.connect(self.cache_path) as connection: with sqlite3.connect(self.cache_path) as connection:
connection.row_factory = sqlite3.Row connection.row_factory = sqlite3.Row
with closing(connection.cursor()) as cursor: with closing(connection.cursor()) as cursor:
cursor.execute(f"INSERT OR IGNORE INTO {arr}_adds({id_type}, library) VALUES(?)", (t_id, library)) cursor.execute(f"INSERT OR IGNORE INTO {arr}_adds({id_type}, library) VALUES(?, ?)", (t_id, library))

View file

@ -23,7 +23,10 @@ class Webhooks:
logger.debug(f"Webhook: {webhook}") logger.debug(f"Webhook: {webhook}")
if webhook == "notifiarr": if webhook == "notifiarr":
url, params = self.notifiarr.get_url("notification/plex/") url, params = self.notifiarr.get_url("notification/plex/")
response = self.config.get(url, json=json, params=params) for x in range(6):
response = self.config.get(url, json=json, params=params)
if response.status_code < 500:
break
else: else:
response = self.config.post(webhook, json=json) response = self.config.post(webhook, json=json)
try: try: