mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-10-10 05:46:55 +08:00
add torrent_category payload
This commit is contained in:
parent
a7b20bf6a4
commit
6799d4db8b
2 changed files with 22 additions and 10 deletions
|
@ -148,15 +148,15 @@ notifiarr:
|
||||||
# Set value to apprise if using apprise integration
|
# Set value to apprise if using apprise integration
|
||||||
# Set value to a valid webhook URL
|
# Set value to a valid webhook URL
|
||||||
webhooks:
|
webhooks:
|
||||||
error: notifiarr
|
error: https://mywebhookurl.com/qbt_manage
|
||||||
run_start: notifiarr
|
run_start: notifiarr
|
||||||
run_end: notifiarr
|
run_end: apprise
|
||||||
function:
|
function:
|
||||||
cross_seed: notifiarr
|
cross_seed:
|
||||||
recheck: notifiarr
|
recheck:
|
||||||
cat_update: notifiarr
|
cat_update:
|
||||||
tag_update: notifiarr
|
tag_update:
|
||||||
rem_unregistered: notifiarr
|
rem_unregistered:
|
||||||
rem_orphaned: notifiarr
|
rem_orphaned:
|
||||||
tag_nohardlinks: notifiarr
|
tag_nohardlinks:
|
||||||
empty_recyclebin: notifiarr
|
empty_recyclebin:
|
|
@ -146,6 +146,7 @@ class Qbt:
|
||||||
"title":"Updating Tags",
|
"title":"Updating Tags",
|
||||||
"body": "\n".join(body),
|
"body": "\n".join(body),
|
||||||
"torrent_name":torrent.name,
|
"torrent_name":torrent.name,
|
||||||
|
"torrent_category":torrent.category,
|
||||||
"torrent_new_tag": tags["new_tag"],
|
"torrent_new_tag": tags["new_tag"],
|
||||||
"torrent_tracker": tags["url"],
|
"torrent_tracker": tags["url"],
|
||||||
"notifiarr_indexer": tags["notifiarr"],
|
"notifiarr_indexer": tags["notifiarr"],
|
||||||
|
@ -238,6 +239,7 @@ class Qbt:
|
||||||
"title":"Tagging Torrents with No Hardlinks",
|
"title":"Tagging Torrents with No Hardlinks",
|
||||||
"body": "\n".join(body),
|
"body": "\n".join(body),
|
||||||
"torrent_name":torrent.name,
|
"torrent_name":torrent.name,
|
||||||
|
"torrent_category":torrent.category,
|
||||||
"torrent_add_tag": 'noHL',
|
"torrent_add_tag": 'noHL',
|
||||||
"torrent_tracker": tags["url"],
|
"torrent_tracker": tags["url"],
|
||||||
"notifiarr_indexer": tags["notifiarr"],
|
"notifiarr_indexer": tags["notifiarr"],
|
||||||
|
@ -267,6 +269,7 @@ class Qbt:
|
||||||
"title":"Untagging Previous Torrents that now have Hard Links",
|
"title":"Untagging Previous Torrents that now have Hard Links",
|
||||||
"body": "\n".join(body),
|
"body": "\n".join(body),
|
||||||
"torrent_name":torrent.name,
|
"torrent_name":torrent.name,
|
||||||
|
"torrent_category":torrent.category,
|
||||||
"torrent_remove_tag": 'noHL',
|
"torrent_remove_tag": 'noHL',
|
||||||
"torrent_tracker": tags["url"],
|
"torrent_tracker": tags["url"],
|
||||||
"notifiarr_indexer": tags["notifiarr"],
|
"notifiarr_indexer": tags["notifiarr"],
|
||||||
|
@ -301,6 +304,7 @@ class Qbt:
|
||||||
"title":"Removing NoHL Torrents and meets Share Limits",
|
"title":"Removing NoHL Torrents and meets Share Limits",
|
||||||
"body": "\n".join(body),
|
"body": "\n".join(body),
|
||||||
"torrent_name":torrent.name,
|
"torrent_name":torrent.name,
|
||||||
|
"torrent_category":torrent.category,
|
||||||
"cleanup": 'True',
|
"cleanup": 'True',
|
||||||
"torrent_tracker": tags["url"],
|
"torrent_tracker": tags["url"],
|
||||||
"notifiarr_indexer": tags["notifiarr"],
|
"notifiarr_indexer": tags["notifiarr"],
|
||||||
|
@ -342,6 +346,7 @@ class Qbt:
|
||||||
]
|
]
|
||||||
for torrent in self.torrentissue:
|
for torrent in self.torrentissue:
|
||||||
t_name = torrent.name
|
t_name = torrent.name
|
||||||
|
t_cat = self.torrentinfo[t_name]['Category']
|
||||||
t_count = self.torrentinfo[t_name]['count']
|
t_count = self.torrentinfo[t_name]['count']
|
||||||
t_msg = self.torrentinfo[t_name]['msg']
|
t_msg = self.torrentinfo[t_name]['msg']
|
||||||
t_status = self.torrentinfo[t_name]['status']
|
t_status = self.torrentinfo[t_name]['status']
|
||||||
|
@ -359,6 +364,7 @@ class Qbt:
|
||||||
"title":"Potential Unregistered Torrents",
|
"title":"Potential Unregistered Torrents",
|
||||||
"body": pot_unr,
|
"body": pot_unr,
|
||||||
"torrent_name":t_name,
|
"torrent_name":t_name,
|
||||||
|
"torrent_category":t_cat,
|
||||||
"torrent_status": msg_up,
|
"torrent_status": msg_up,
|
||||||
"torrent_tracker": tags["url"],
|
"torrent_tracker": tags["url"],
|
||||||
"notifiarr_indexer": tags["notifiarr"],
|
"notifiarr_indexer": tags["notifiarr"],
|
||||||
|
@ -391,6 +397,7 @@ class Qbt:
|
||||||
"title":"Removing Unregistered Torrents",
|
"title":"Removing Unregistered Torrents",
|
||||||
"body": "\n".join(body),
|
"body": "\n".join(body),
|
||||||
"torrent_name":t_name,
|
"torrent_name":t_name,
|
||||||
|
"torrent_category":t_cat,
|
||||||
"torrent_status": msg_up,
|
"torrent_status": msg_up,
|
||||||
"torrent_tracker": tags["url"],
|
"torrent_tracker": tags["url"],
|
||||||
"notifiarr_indexer": tags["notifiarr"],
|
"notifiarr_indexer": tags["notifiarr"],
|
||||||
|
@ -466,6 +473,7 @@ class Qbt:
|
||||||
#Tag missing cross-seed torrents tags
|
#Tag missing cross-seed torrents tags
|
||||||
for torrent in self.torrent_list:
|
for torrent in self.torrent_list:
|
||||||
t_name = torrent.name
|
t_name = torrent.name
|
||||||
|
t_cat = torrent.category
|
||||||
if 'cross-seed' not in torrent.tags and self.torrentinfo[t_name]['count'] > 1 and self.torrentinfo[t_name]['first_hash'] != torrent.hash:
|
if 'cross-seed' not in torrent.tags and self.torrentinfo[t_name]['count'] > 1 and self.torrentinfo[t_name]['first_hash'] != torrent.hash:
|
||||||
tagged += 1
|
tagged += 1
|
||||||
body = print_line(f"{'Not Adding' if dry_run else 'Adding'} 'cross-seed' tag to {t_name}",loglevel)
|
body = print_line(f"{'Not Adding' if dry_run else 'Adding'} 'cross-seed' tag to {t_name}",loglevel)
|
||||||
|
@ -474,6 +482,7 @@ class Qbt:
|
||||||
"title":"Tagging Cross-Seed Torrent",
|
"title":"Tagging Cross-Seed Torrent",
|
||||||
"body":body,
|
"body":body,
|
||||||
"torrent_name":t_name,
|
"torrent_name":t_name,
|
||||||
|
"torrent_category": t_cat,
|
||||||
"torrent_add_tag": "cross-seed"
|
"torrent_add_tag": "cross-seed"
|
||||||
}
|
}
|
||||||
self.config.send_notifications(attr)
|
self.config.send_notifications(attr)
|
||||||
|
@ -509,6 +518,7 @@ class Qbt:
|
||||||
"title":"Resuming Torrent",
|
"title":"Resuming Torrent",
|
||||||
"body": body,
|
"body": body,
|
||||||
"torrent_name":torrent.name,
|
"torrent_name":torrent.name,
|
||||||
|
"torrent_category":torrent.category,
|
||||||
"torrent_tracker": tags["url"],
|
"torrent_tracker": tags["url"],
|
||||||
"notifiarr_indexer": tags["notifiarr"],
|
"notifiarr_indexer": tags["notifiarr"],
|
||||||
}
|
}
|
||||||
|
@ -530,6 +540,7 @@ class Qbt:
|
||||||
"title":"Resuming Torrent",
|
"title":"Resuming Torrent",
|
||||||
"body": body,
|
"body": body,
|
||||||
"torrent_name":torrent.name,
|
"torrent_name":torrent.name,
|
||||||
|
"torrent_category":torrent.category,
|
||||||
"torrent_tracker": tags["url"],
|
"torrent_tracker": tags["url"],
|
||||||
"notifiarr_indexer": tags["notifiarr"],
|
"notifiarr_indexer": tags["notifiarr"],
|
||||||
}
|
}
|
||||||
|
@ -544,6 +555,7 @@ class Qbt:
|
||||||
"title":"Rechecking Torrent",
|
"title":"Rechecking Torrent",
|
||||||
"body": body,
|
"body": body,
|
||||||
"torrent_name":torrent.name,
|
"torrent_name":torrent.name,
|
||||||
|
"torrent_category":torrent.category,
|
||||||
"torrent_tracker": tags["url"],
|
"torrent_tracker": tags["url"],
|
||||||
"notifiarr_indexer": tags["notifiarr"],
|
"notifiarr_indexer": tags["notifiarr"],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue