mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-10-29 07:26:25 +08:00
fixes bug in webhooks
This commit is contained in:
parent
44f69c7e55
commit
dbf8b6a87f
2 changed files with 2 additions and 15 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
4.0.0-develop15
|
||||
4.0.0-develop16
|
||||
|
|
|
|||
|
|
@ -211,10 +211,6 @@ class Webhooks:
|
|||
attr["torrent_tag"] = group_attr[group].get("torrent_tag") if only_one_torrent_updated else None
|
||||
attr["notifiarr_indexer"] = group_attr[group].get("notifiarr_indexer")
|
||||
|
||||
for extra_attr in payload:
|
||||
if extra_attr not in attr:
|
||||
attr[extra_attr] = payload[extra_attr]
|
||||
|
||||
self.config.send_notifications(attr)
|
||||
else:
|
||||
for attr in payload:
|
||||
|
|
@ -227,16 +223,7 @@ def group_notifications_by_key(payload, key):
|
|||
for attr in payload:
|
||||
group = attr[key]
|
||||
if group not in group_attr:
|
||||
group_attr[group] = {
|
||||
"function": attr.get("function"),
|
||||
"title": attr.get("title"),
|
||||
"body": attr.get("body"),
|
||||
"torrent_category": attr.get("torrent_category"),
|
||||
"torrent_tag": attr.get("torrent_tag"),
|
||||
"torrents": [attr.get("torrents", [None])[0]],
|
||||
"torrent_tracker": attr.get("torrent_tracker"),
|
||||
"notifiarr_indexer": attr.get("notifiarr_indexer"),
|
||||
}
|
||||
group_attr[group] = attr
|
||||
else:
|
||||
group_attr[group]["torrents"].append(attr.get("torrents", [None])[0])
|
||||
return group_attr
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue