Kometa-Team / Kometa

Python script to update metadata information for items in plex as well as automatically build collections and playlists. The Wiki Documentation is linked below.
https://kometa.wiki
MIT License
2.55k stars 307 forks source link

Multiple comma-separated webhooks don't work #2277

Open chazlarson opened 1 month ago

chazlarson commented 1 month ago

Version Number

2.1.0

What branch are you on?kome

nightly

Describe the Bug

The wiki says this should work:

  run_start: gotify, notifiarr

But it doesn't:

| Traceback (most recent call last):                                                                 |
|   File "/home/chaz/kometa/.direnv/python-3.12.6/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__ |
|     result = fn(*args, **kwargs)                                                                   |
|              ^^^^^^^^^^^^^^^^^^^                                                                   |
|   File "/home/chaz/kometa/modules/request.py", line 175, in post                             |
|     return self.session.post(url, data=data, json=json, headers=get_header(headers, header, language)) |
|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|   File "/home/chaz/kometa/.direnv/python-3.12.6/lib/python3.12/site-packages/requests/sessions.py", line 637, in post |
|     return self.request("POST", url, data=data, json=json, **kwargs)                               |
|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                               |
|   File "/home/chaz/kometa/.direnv/python-3.12.6/lib/python3.12/site-packages/requests/sessions.py", line 575, in request |
|     prep = self.prepare_request(req)                                                               |
|            ^^^^^^^^^^^^^^^^^^^^^^^^^                                                               |
|   File "/home/chaz/kometa/.direnv/python-3.12.6/lib/python3.12/site-packages/requests/sessions.py", line 484, in prepare_request |
|     p.prepare(                                                                                     |
|   File "/home/chaz/kometa/.direnv/python-3.12.6/lib/python3.12/site-packages/requests/models.py", line 367, in prepare |
|     self.prepare_url(url, params)                                                                  |
|   File "/home/chaz/kometa/.direnv/python-3.12.6/lib/python3.12/site-packages/requests/models.py", line 438, in prepare_url |
|     raise MissingSchema(                                                                           |
| requests.exceptions.MissingSchema: Invalid URL 'gotify, notifiarr': No scheme supplied. Perhaps you meant https://gotify, notifiarr? |
|                                                                                                    |
| The above exception was the direct cause of the following exception:                               |
|                                                                                                    |
| Traceback (most recent call last):                                                                 |
|   File "/home/chaz/kometa/kometa.py", line 333, in start                                     |
|     config = ConfigFile(my_requests, default_dir, attrs, secret_args)                              |
|              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                              |
|   File "/home/chaz/kometa/modules/config.py", line 577, in __init__                          |
|     self.Webhooks.start_time_hooks(self.start_time)                                                |
|   File "/home/chaz/kometa/modules/webhooks.py", line 79, in start_time_hooks                 |
|     self._request(self.run_start_webhooks, {"event": "run_start", "start_time": start_time.strftime("%Y-%m-%d %H:%M:%S")}) |
|   File "/home/chaz/kometa/modules/webhooks.py", line 43, in _request                         |
|     response = self.requests.post(webhook, json=json)                                              |
|                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                              |
|   File "/home/chaz/kometa/.direnv/python-3.12.6/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f |
|     return copy(f, *args, **kw)                                                                    |
|            ^^^^^^^^^^^^^^^^^^^^                                                                    |
|   File "/home/chaz/kometa/.direnv/python-3.12.6/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__ |
|     do = self.iter(retry_state=retry_state)                                                        |
|          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                        |
|   File "/home/chaz/kometa/.direnv/python-3.12.6/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter |
|     result = action(retry_state)                                                                   |
|              ^^^^^^^^^^^^^^^^^^^                                                                   |
|   File "/home/chaz/kometa/.direnv/python-3.12.6/lib/python3.12/site-packages/tenacity/__init__.py", line 419, in exc_check |
|     raise retry_exc from fut.exception()                                                           |
| tenacity.RetryError: RetryError[<Future at 0x77b92de08cb0 state=finished raised MissingSchema>]    |
|                                                                                                    |
| RetryError[<Future at 0x77b92de08cb0 state=finished raised MissingSchema>]                         |

Either works fine on its own, but multiples don't.

Relevant Collection/Overlay/Playlist Definition

No response

Logs

No response

chazlarson commented 1 month ago

They do work as a list, so the path of least resistance is probably to update the wiki to reflect this.