mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-22 20:43:07 +00:00
fix cache error
This commit is contained in:
parent
7ac8f2fcb5
commit
e2f27c14d4
2 changed files with 5 additions and 2 deletions
|
@ -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))
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue