diff --git a/Commands.md b/Commands.md
index 19414ed..3d76695 100644
--- a/Commands.md
+++ b/Commands.md
@@ -13,8 +13,11 @@
| `-tte` or `--tag-tracker-error` | QBT_TAG_TRACKER_ERROR | tag_tracker_error | Use this if you would like to tag torrents that do not have a working tracker. | False |
| `-ro` or `--rem-orphaned` | QBT_REM_ORPHANED | rem_orphaned | Use this if you would like to remove orphaned files from your `root_dir` directory that are not referenced by any torrents. It will scan your `root_dir` directory and compare it with what is in qBittorrent. Any data not referenced in qBittorrent will be moved into `/data/torrents/orphaned_data` folder for you to review/delete. | False |
| `-tnhl` or `--tag-nohardlinks` | QBT_TAG_NOHARDLINKS | tag_nohardlinks | Use this to tag any torrents that do not have any hard links associated with any of the files. This is useful for those that use Sonarr/Radarr that hard links your media files with the torrents for seeding. When files get upgraded they no longer become linked with your media therefore will be tagged with a new tag noHL. You can then safely delete/remove these torrents to free up any extra space that is not being used by your media folder. | False |
+| `-sl` or `--share-limits` | QBT_SHARE_LIMITS | share_limits | Control how torrent share limits are set depending on the priority of your grouping. Each torrent will be matched with the share limit group with the highest priority that meets the group filter criteria. Each torrent can only be matched with one share limit group. | False |
| `-sc` or `--skip-cleanup` | QBT_SKIP_CLEANUP | skip_cleanup | Use this to skip emptying the Recycle Bin folder (`/root_dir/.RecycleBin`) and Orphaned directory. (`/root_dir/orphaned_data`) | False |
| `-dr` or `--dry-run` | QBT_DRY_RUN | dry_run | If you would like to see what is gonna happen but not actually move/delete or tag/categorize anything. | False |
-| `-ll` or `--log-level LOGLEVEL` | QBT_LOG_LEVEL | N/A | Change the output log level. | INFO |
+| `-ll` or `--log-level LOGLEVEL` | QBT_LOG_LEVEL | N/A | Change the output log level. | INFO
+`--debug` | QBT_DEBUG | N/A | Adds debug logs | False |
+`--trace` | QBT_TRACE | N/A | Adds trace logs | False |
| `-d` or `--divider` | QBT_DIVIDER | N/A | Character that divides the sections (Default: '=') | = |
| `-w` or `--width` | QBT_WIDTH | N/A | Screen Width (Default: 100) | 100 |
diff --git a/Config-Setup.md b/Config-Setup.md
index c79dab7..ca2b04d 100644
--- a/Config-Setup.md
+++ b/Config-Setup.md
@@ -47,6 +47,8 @@ This section defines any settings defined in the configuration.
| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------- |
| `force_auto_tmm` | Will force qBittorrent to enable Automatic Torrent Management for each torrent. |
❌ |
| `tracker_error_tag` | Define the tag of any torrents that do not have a working tracker. (Used in `--rem-unregistered` and `--tag-tracker-error`) | ❌ |
+| `nohardlinks_tag` | Define the tag of any torrents that don't have hardlinks (Used in `--tag-nohardlinks`) | ❌ |
+| `share_limits_suffix_tag` | Will add this suffix to the grouping separated by '.' to the tag of any torrents with share limits. For example, if you have a share-limit group `cross-seed`, the default share_limits_suffix_tag `share_limits` would add the tag `cross-seed.share_limit` (Used in `--share-limits`) | ❌ |
| `ignoreTags_OnUpdate` | When running `--tag-update` function, it will update torrent tags for a given torrent even if the torrent has one or more of the tags defined here. | ❌ |
## **directory:**
@@ -108,13 +110,8 @@ This section defines the tags used based upon the tracker's URL.
| Variable | Definition | Default Values | Required |
| :------------------- | :-------------------------------------------------------------------------------------------------------------------------------- | :------------- | :----------------- |
| `tag` | The tracker tag or additional list of tags defined | Tracker URL | ✅ |
-| `max_ratio` | Will set the torrent Maximum share ratio until torrent is stopped from seeding/uploading. (`-2` : Global Limit , `-1` : No Limit) | None | ❌ |
-| `max_seeding_time` | Will set the torrent Maximum seeding time (min) until torrent is stopped from seeding. (`-2` : Global Limit , `-1` : No Limit) | None | ❌ |
-| `limit_upload_speed` | Will limit the upload speed KiB/s (KiloBytes/second) (`-1` : No Limit) | None | ❌ |
| `notifiarr` | Set this to the notifiarr react name. This is used to add indexer reactions to the notifications sent by Notifiarr | None | ❌ |
-If either max_ratio or max_seeding_time is set to `-2` then the the global share limits will be used, `-1` then no share limits will be used.
-
If you are unsure what key word to use. Simply select a torrent within qB and down at the bottom you should see a tab that says `Trackers` within the list that is populated there are ea list of trackers that are associated with this torrent, select a key word from there and add it to the config file. Make sure this key word is unique enough that the script will not get confused with any other tracker.
## **nohardlinks:**
@@ -138,13 +135,29 @@ Beyond this you'll need to use one of the [categories](#cat) above as the key, a
| Variable | Definition | Default Values | Required |
| :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------- | :----------------- |
-| `cleanup` | True = Remove the non-hardlinked torrent data/contents once share limits have been met, False = Use (Automatic Torrent Management) to handle seeding limits | False | ✅ |
-| `max_ratio` | Will set the torrent Maximum share ratio until torrent is stopped from seeding/uploading. (`-2` : Global Limit , `-1` : No Limit) | None | ❌ |
-| `max_seeding_time` | Will set the torrent Maximum seeding time (min) until torrent is stopped from seeding. (`-2` : Global Limit , `-1` : No Limit) (The `max_seeding_time` will count from the moment the NoHL tag is set) | None | ❌ |
-| `limit_upload_speed` | Will limit the upload speed KiB/s (KiloBytes/second) (`-1` : No Limit) | None | ❌ |
-| `min_seeding_time` | Will ensure that torrent is not deleted by cleanup variable if torrent does not meet minimum seeding time (min). | None | ❌ |
| `exclude_tags` | List of tags to exclude from the check. Torrents with any of these tags will not be processed. This is useful to exclude certain trackers from being scanned for hardlinking purposes | None | ❌ |
+## **share_limits:**
+Control how torrent share limits are set depending on the priority of your grouping. This can apply a max ratio, seed time limits to your torrents or limit your torrent upload speed as well. Each torrent will be matched with the share limit group with the highest priority that meets the group filter criteria. Each torrent can only be matched with one share limit group.
+| Configuration | Definition | Required |
+| :------------ | :--------------------------------------------------------------- | :----------------- |
+| `key` | This variable is mandatory and is a text defining the name of your grouping. This can be any string you want. | ✅ |
+
+| Variable | Definition | Default Values | Type | Required |
+| :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------- | :----------------- | :----------------- |
+| `priority` | This is the priority of your grouping. The lower the number the higher the priority. This determines the order in which share limits are applied based on the filters set in this group | largest priority + 1 | int/float | ✅ |
+| `include_all_tags` | Filter the group based on one or more tags. Multiple include_all_tags are checked with an **AND** condition. All tags defined here must be present in the torrent for it to be included in this group | None | list | ❌ |
+| `include_any_tags` | Filter the group based on one or more tags. Multiple include_any_tags are checked with an **OR** condition. Any tags defined here must be present in the torrent for it to be included in this group | None | list | ❌ |
+| `exclude_all_tags` | Filter the group based on one or more tags. Multiple exclude_all_tags are checked with an **AND** condition. All tags defined here must be present in the torrent for it to be excluded in this group | None | list | ❌ |
+| `exclude_any_tags` | Filter the group based on one or more tags. Multiple exclude_any_tags are checked with an **OR** condition. Any tags defined here must be present in the torrent for it to be excluded in this group | None | list | ❌ |
+| `categories` | Filter by excluding one or more categories. Multiple categories are checked with an **OR** condition. Since one torrent can only be associated with a single category, multiple categories are checked with an **OR** condition | None | list | ❌ |
+| `cleanup` | **WARNING!!** Setting this as true will remove and delete contents of any torrents that satisfies the share limits | False | bool | ❌ |
+| `max_ratio` | Will set the torrent Maximum share ratio until torrent is stopped from seeding/uploading. (`-2` : Global Limit , `-1` : No Limit) | -1 | float | ❌ |
+| `max_seeding_time` | Will set the torrent Maximum seeding time (minutes) until torrent is stopped from seeding. (`-2` : Global Limit , `-1` : No Limit) | -1 | int | ❌ |
+| `limit_upload_speed` | Will limit the upload speed KiB/s (KiloBytes/second) (`-1` : No Limit) | -1 | int | ❌ |
+| `min_seeding_time` | Will prevent torrent deletion by cleanup variable if torrent has not yet minimum seeding time (minutes). | 0 | int | ❌ |
+| `resume_torrent_after_change` | Will resume your torrent after changing share limits. | True | bool | ❌ |
+| `add_group_to_tag` | This adds your grouping as a tag with a suffix defined in settings. Example: A grouping defined as noHL will have a tag set to noHL.share_limit (if using the default suffix) | True | bool | ❌ |
## **recyclebin:**
---
@@ -211,6 +224,7 @@ Provide webhook notifications based on event triggers
| [tag_tracker_error](#tag-tracker-error-notifications) | During the removing unregistered torrents/tag tracker error function | N/A | ❌ |
| [rem_orphaned](#remove-orphaned-files-notifications) | During the removing orphaned function | N/A | ❌ |
| [tag_nohardlinks](#tag-no-hardlinks-notifications) | During the tag no hardlinks function | N/A | ❌ |
+| [share_limits](#share-limits-notifications) | During the share limits function | N/A | ❌ |
| [cleanup_dirs](#cleanup-directories-notifications) | When files are deleted from certain directories | N/A | ❌ |
### **Error Notifications**
@@ -267,6 +281,8 @@ Payload will be sent at the end of the run
"orphaned_files_found": int, // Total Orphaned Files Found
"torrents_tagged_no_hardlinks": int, // Total noHL Torrents Tagged
"torrents_untagged_no_hardlinks": int, // Total noHL Torrents untagged
+ "torrents_updated_share_limits": int // Total Share Limits updated
+ "torrents_cleaned_share_limits": int // Total Share Limit Torrents Cleaned (Deleted + Contents Deleted)
"files_deleted_from_recyclebin": int, // Total Files Deleted from Recycle Bin
"files_deleted_from_orphaned": int // Total Files Deleted from Orphaned Data
}
@@ -281,7 +297,7 @@ Payload will be sent when adding a cross-seed torrent to qBittorrent if the orig
"function": "cross_seed", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "torrents": [str], // List of Torrent Names
"torrent_category": str, // Torrent Category
"torrent_save_path": str, // Torrent Download directory
"torrent_tag": "cross-seed", // Total Torrents Added
@@ -296,7 +312,7 @@ Payload will be sent when there are existing torrents found that are missing the
"function": "tag_cross_seed", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "torrents": [str], // List of Torrent Names
"torrent_category": str, // Torrent Category
"torrent_tag": "cross-seed", // Tag Added
"torrent_tracker": str // Torrent Tracker
@@ -312,7 +328,8 @@ Payload will be sent when rechecking/resuming a torrent that is paused
"function": "recheck", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "torrents": [str], // List of Torrent Names
+ "torrent_tag": str, // Torrent Tags
"torrent_category": str, // Torrent Category
"torrent_tracker": str, // Torrent Tracker URL
"notifiarr_indexer": str, // Notifiarr React name/id for indexer
@@ -328,8 +345,9 @@ Payload will be sent when updating torrents with missing category
"function": "cat_update", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "torrents": [str], // List of Torrent Names
"torrent_category": str, // New Torrent Category
+ "torrent_tag": str, // Torrent Tags
"torrent_tracker": str, // Torrent Tracker URL
"notifiarr_indexer": str, // Notifiarr React name/id for indexer
}
@@ -344,14 +362,11 @@ Payload will be sent when updating torrents with missing tag
"function": "tag_update", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "torrents": [str], // List of Torrent Names
"torrent_category": str, // Torrent Category
"torrent_tag": str, // New Torrent Tag
"torrent_tracker": str, // Torrent Tracker URL
"notifiarr_indexer": str, // Notifiarr React name/id for indexer
- "torrent_max_ratio": float, // Set the Max Ratio Share Limit
- "torrent_max_seeding_time": int, // Set the Max Seeing Time (min) Share Limit
- "torrent_limit_upload_speed": int // Set the the torrent upload speed limit
}
```
@@ -364,9 +379,10 @@ Payload will be sent when Unregistered Torrents are found
"function": "rem_unregistered", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "torrents": [str], // List of Torrent Names
"torrent_category": str, // Torrent Category
"torrent_status": str, // Torrent Tracker Status message
+ "torrent_tag": str, // Torrent Tags
"torrent_tracker": str, // Torrent Tracker URL
"notifiarr_indexer": str, // Notifiarr React name/id for indexer
"torrents_deleted_and_contents": bool, // Deleted Torrents and contents or Deleted just the torrent
@@ -382,7 +398,7 @@ Payload will be sent when trackers with errors are tagged/untagged
"function": "tag_tracker_error", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "torrents": [str], // List of Torrent Names
"torrent_category": str, // Torrent Category
"torrent_tag": "issue", // Tag Added
"torrent_status": str, // Torrent Tracker Status message
@@ -396,7 +412,7 @@ Payload will be sent when trackers with errors are tagged/untagged
"function": "untag_tracker_error", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "torrents": [str], // List of Torrent Names
"torrent_category": str, // Torrent Category
"torrent_tag": str, // Tag Added
"torrent_tracker": str, // Torrent Tracker URL
@@ -428,14 +444,11 @@ Payload will be sent when no hard links are found for any files in a particular
"function": "tag_nohardlinks", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "torrents": [str], // List of Torrent Names
"torrent_category": str, // Torrent Category
"torrent_tag": 'noHL', // Add `noHL` to Torrent Tags
"torrent_tracker": str, // Torrent Tracker URL
"notifiarr_indexer": str, // Notifiarr React name/id for indexer
- "torrent_max_ratio": float, // Set the Max Ratio Share Limit
- "torrent_max_seeding_time": int, // Set the Max Seeing Time (min) Share Limit
- "torrent_limit_upload_speed": int // Set the the torrent upload speed limit
}
```
@@ -446,25 +459,40 @@ Payload will be sent when hard links are found for any torrents that were previo
"function": "untag_nohardlinks", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "torrents": [str], // List of Torrent Names
"torrent_category": str, // Torrent Category
"torrent_tag": 'noHL', // Remove `noHL` from Torrent Tags
"torrent_tracker": str, // Torrent Tracker URL
"notifiarr_indexer": str, // Notifiarr React name/id for indexer
- "torrent_max_ratio": float, // Set the Max Ratio Share Limit
- "torrent_max_seeding_time": int, // Set the Max Seeing Time (min) Share Limit
- "torrent_limit_upload_speed": int // Set the the torrent upload speed limit
}
```
-Payload will be sent when `cleanup` flag is set to true and `noHL` torrent meets share limit criteria.
+### **Share Limits Notifications**
+Payload will be sent when Share Limits are updated for a specific group
+```yaml
+{
+ "function": "share_limits", // Webhook Trigger keyword
+ "title": str, // Title of the Payload
+ "body": str, // Message of the Payload
+ "grouping": str, // Share Limit group name
+ "torrents": [str], // List of Torrent Names
+ "torrent_tag": str, // Torrent Tags
+ "torrent_max_ratio": float, // Set the Max Ratio Share Limit
+ "torrent_max_seeding_time": int, // Set the Max Seeding Time (minutes) Share Limit
+ "torrent_min_seeding_time": int, // Set the Min Seeding Time (minutes) Share Limit
+ "torrent_limit_upload_speed": int // Set the the torrent upload speed limit (kB/s)
+}
+```
+
+Payload will be sent when `cleanup` flag is set to true and torrent meets share limit criteria.
```yaml
{
- "function": "cleanup_tag_nohardlinks", // Webhook Trigger keyword
+ "function": "cleanup_share_limits", // Webhook Trigger keyword
"title": str, // Title of the Payload
"body": str, // Message of the Payload
- "torrent_name": str, // Torrent Name
+ "grouping": str, // Share Limit group name
+ "torrents": [str], // List of Torrent Names
"torrent_category": str, // Torrent Category
"cleanup": True, // Cleanup flag
"torrent_tracker": str, // Torrent Tracker URL
@@ -473,6 +501,7 @@ Payload will be sent when `cleanup` flag is set to true and `noHL` torrent meets
}
```
+
### **Cleanup directories Notifications**
Payload will be sent when files are deleted/cleaned up from the various folders
diff --git a/Home.md b/Home.md
index 1dc6187..85d0e98 100644
--- a/Home.md
+++ b/Home.md
@@ -35,6 +35,7 @@ This wiki should tell you everything you need to know about the script to get it
* [cat_changes](Config-Setup#cat_changes)
* [tracker](Config-Setup#tracker)
* [nohardlinks](Config-Setup#nohardlinks)
+ * [share_limits](Config-Setup#share_limits)
* [recyclebin](Config-Setup#recyclebin)
* [orphaned](Config-Setup#orphaned)
* [apprise](Config-Setup#apprise)
diff --git a/_Sidebar.md b/_Sidebar.md
index e9df28e..186613b 100644
--- a/_Sidebar.md
+++ b/_Sidebar.md
@@ -16,6 +16,7 @@
- [cat_changes](Config-Setup#cat_changes)
- [tracker](Config-Setup#tracker)
- [nohardlinks](Config-Setup#nohardlinks)
+ - [share_limits](Config-Setup#share_limits)
- [recyclebin](Config-Setup#recyclebin)
- [orphaned](Config-Setup#orphaned)
- [apprise](Config-Setup#apprise)