mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-09-10 23:25:42 +08:00
change default share_limits_tag to start with ~
in order to add the tag at the end to declutter webUI
This commit is contained in:
parent
2f779e1960
commit
73f11ec437
5 changed files with 13 additions and 8 deletions
|
@ -10,14 +10,15 @@
|
|||
- Logic for `share_limits_suffix_tag` changed to become a prefix tag instead along with adding the priority of the group. The reason for this change is so it's easier to see the share limit groups togethered in qbitorrent ordered by priority.
|
||||
- `share_limits_suffix_tag` key is now `share_limits_tag`
|
||||
- No config changes are required as the qbm will automatically change the previous `share_limits_suffix_tag` key to `share_limits_tag`
|
||||
- Changes the default value of `share_limits_tag` to `~share_limit`. The `~` is used to sort the `share_limits_tag` in the qbt webUI to the bottom for less clutter
|
||||
|
||||
Example based on config.sample:
|
||||
|
||||
| old tag (v4.0.0) | new tag (v4.0.1) |
|
||||
| ----------- | ----------- |
|
||||
| noHL.share_limits | share_limits_1.noHL |
|
||||
| cross-seed.share_limits | share_limits_2.cross-seed |
|
||||
| PTP.share_limits | share_limits_3.PTP |
|
||||
| default.share_limits | share_limits_999.default |
|
||||
| noHL.share_limit | ~share_limit_1.noHL |
|
||||
| cross-seed.share_limit | ~share_limit_2.cross-seed |
|
||||
| PTP.share_limit | ~share_limit_3.PTP |
|
||||
| default.share_limit | ~share_limit_999.default |
|
||||
|
||||
**Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v4.0.0...v4.0.1
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
4.0.1-develop3
|
||||
4.0.1-develop4
|
||||
|
|
|
@ -28,7 +28,7 @@ settings:
|
|||
force_auto_tmm: False # Will force qBittorrent to enable Automatic Torrent Management for each torrent.
|
||||
tracker_error_tag: issue # Will set the tag of any torrents that do not have a working tracker.
|
||||
nohardlinks_tag: noHL # Will set the tag of any torrents with no hardlinks.
|
||||
share_limits_tag: share_limit # Will add this tag when applying share limits to provide an easy way to filter torrents by share limit group/priority for each torrent
|
||||
share_limits_tag: ~share_limit # Will add this tag when applying share limits to provide an easy way to filter torrents by share limit group/priority for each torrent
|
||||
ignoreTags_OnUpdate: # When running tag-update function, it will update torrent tags for a given torrent even if the torrent has at least one or more of the tags defined here. Otherwise torrents will not be tagged if tags exist.
|
||||
- noHL
|
||||
- issue
|
||||
|
|
|
@ -146,7 +146,10 @@ class Config:
|
|||
self.loglevel = "DRYRUN" if self.dry_run else "INFO"
|
||||
self.session = requests.Session()
|
||||
|
||||
share_limits_tag = self.data["settings"].get("share_limits_suffix_tag", "share_limits")
|
||||
share_limits_tag = self.data["settings"].get("share_limits_suffix_tag", "~share_limit")
|
||||
# Convert previous share_limits_suffix_tag to new default share_limits_tag
|
||||
if share_limits_tag == "share_limit":
|
||||
share_limits_tag = "~share_limit"
|
||||
|
||||
self.settings = {
|
||||
"force_auto_tmm": self.util.check_for_attribute(
|
||||
|
|
|
@ -438,6 +438,7 @@ class ShareLimits:
|
|||
def delete_share_limits_suffix_tag(self):
|
||||
""" "Delete Share Limits Suffix Tag from version 4.0.0"""
|
||||
tags = self.client.torrent_tags.tags
|
||||
old_share_limits_tag = self.share_limits_tag[1:] if self.share_limits_tag.startswith("~") else self.share_limits_tag
|
||||
for tag in tags:
|
||||
if tag.endswith(f".{self.share_limits_tag}"):
|
||||
if tag.endswith(f".{old_share_limits_tag}"):
|
||||
self.client.torrent_tags.delete_tags(tag)
|
||||
|
|
Loading…
Add table
Reference in a new issue