diff --git a/Commands.md b/Commands.md
index 5888d66..19414ed 100644
--- a/Commands.md
+++ b/Commands.md
@@ -1,20 +1,20 @@
-| Shell Command |Docker Environment Variable | Config Command | Description | Default Value |
-| :------------ | :------------ | :------------ | :------------ | :------------ |
-| `-r` or`--run` | QBT_RUN | N/A |Run without the scheduler. Script will exit after completion. | False |
-| `-sch` or `--schedule` | QBT_SCHEDULE | N/A | Schedule to run every x minutes. (Default set to 1440 (1 day)) | 1440 |
-| `-sd` or `--startup-delay` | QBT_STARTUP_DELAY | N/A | Set delay in seconds on the first run of a schedule (Default set to 0) | 0 |
-| `-c CONFIG` or `--config-file CONFIG` | QBT_CONFIG | N/A | This is used if you want to use a different name for your config.yml. `Example: tv.yml` | config.yml |
-| `-lf LOGFILE,` or `--log-file LOGFILE,` | QBT_LOGFILE | N/A | This is used if you want to use a different name for your log file. `Example: tv.log` | activity.log |
-| `-cs` or `--cross-seed` | QBT_CROSS_SEED | cross_seed | Use this after running [cross-seed script](https://github.com/mmgoodnow/cross-seed) to add torrents from the cross-seed output folder to qBittorrent | False |
-| `-re` or `--recheck` | QBT_RECHECK | recheck | Recheck paused torrents sorted by lowest size. Resume if Completed. | False |
-| `-cu` or `--cat-update` | QBT_CAT_UPDATE | cat_update | Use this if you would like to update your categories or move from one category to another. | False |
-| `-tu` or `--tag-update` | QBT_TAG_UPDATE | tag_update | Use this if you would like to update your tags and/or set seed goals/limit upload speed by tag. (Only adds tags to untagged torrents) | False |
-| `-ru` or `--rem-unregistered` | QBT_REM_UNREGISTERED | rem_unregistered | Use this if you would like to remove unregistered torrents. (It will the delete data & torrent if it is not being cross-seeded, otherwise it will just remove the torrent without deleting data). Trackers that have an error and not covered by the remove unregistered logic will also be tagged as `issue` for manual review.| False |
-| `-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 |
-| `-sc` or `--skip-cleanup` | QBT_SKIP_CLEANUP | skip_cleanup | Use this to skip emptying the Reycle 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 ouput log level. | INFO |
-| `-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 |
\ No newline at end of file
+| Shell Command | Docker Environment Variable | Config Command | Description | Default Value |
+| :-------------------------------------- | :-------------------------- | :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
+| `-r` or`--run` | QBT_RUN | N/A | Run without the scheduler. Script will exit after completion. | False |
+| `-sch` or `--schedule` | QBT_SCHEDULE | N/A | Schedule to run every x minutes. (Default set to 1440 (1 day)) | 1440 |
+| `-sd` or `--startup-delay` | QBT_STARTUP_DELAY | N/A | Set delay in seconds on the first run of a schedule (Default set to 0) | 0 |
+| `-c CONFIG` or `--config-file CONFIG` | QBT_CONFIG | N/A | This is used if you want to use a different name for your config.yml. `Example: tv.yml` | config.yml |
+| `-lf LOGFILE,` or `--log-file LOGFILE,` | QBT_LOGFILE | N/A | This is used if you want to use a different name for your log file. `Example: tv.log` | activity.log |
+| `-cs` or `--cross-seed` | QBT_CROSS_SEED | cross_seed | Use this after running [cross-seed script](https://github.com/mmgoodnow/cross-seed) to add torrents from the cross-seed output folder to qBittorrent | False |
+| `-re` or `--recheck` | QBT_RECHECK | recheck | Recheck paused torrents sorted by lowest size. Resume if Completed. | False |
+| `-cu` or `--cat-update` | QBT_CAT_UPDATE | cat_update | Use this if you would like to update your categories or move from one category to another. | False |
+| `-tu` or `--tag-update` | QBT_TAG_UPDATE | tag_update | Use this if you would like to update your tags and/or set seed goals/limit upload speed by tag. (Only adds tags to untagged torrents) | False |
+| `-ru` or `--rem-unregistered` | QBT_REM_UNREGISTERED | rem_unregistered | Use this if you would like to remove unregistered torrents. (It will the delete data & torrent if it is not being cross-seeded, otherwise it will just remove the torrent without deleting data). Trackers that have an error and not covered by the remove unregistered logic will also be tagged as `issue` for manual review. | False |
+| `-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 |
+| `-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 |
+| `-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 634a419..1e64ad4 100644
--- a/Config-Setup.md
+++ b/Config-Setup.md
@@ -1,5 +1,6 @@
# Overview
+
The script utilizes a YAML config file to load information to connect to the various APIs you can connect with.
By default, the script looks at /config/config.yml for the Configuration File unless otherwise specified.
@@ -7,11 +8,12 @@ By default, the script looks at /config/config.yml for the Configuration File un
A template Configuration File can be found in the repo [config/config.yml.sample](https://github.com/StuffAnThings/qbit_manage/blob/master/config/config.yml.sample).
**WARNING**
-> As this software is constantly evolving and this wiki might not be up to date the sample shown here might not might not be current. Please referr to the repo for the most current version.
+> As this software is constantly evolving and this wiki might not be up to date the sample shown here might not might not be current. Please refer to the repo for the most current version.
# Config File
-**Sample**
+## Sample
+
```yaml
# This is an example configuration file that documents all the options.
# It will need to be modified for your specific use case.
@@ -40,7 +42,7 @@ qbt:
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.
- 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.
+ 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
- cross-seed
@@ -77,6 +79,7 @@ cat_change:
tracker:
+ # Mandatory
# Tag Parameters
# : # This is the keyword in the tracker url
# Set tag name. Can be a list of tags or a single tag
@@ -85,7 +88,9 @@ tracker:
# max_ratio: 5.0
# Will set the torrent Maximum seeding time (min) until torrent is stopped from seeding. -2 means the global limit should be used, -1 means no limit.
# max_seeding_time: 129600
- # Will limit the upload speed KiB/s (KiloBytes/second) (-1 sets the limit to infinity)
+ # Will ensure that noHL torrents from this tracker are not deleted by cleanup variable if torrent has not yet met the minimum seeding time (min).
+ # min_seeding_time: 2000
+ # Will limit the upload speed KiB/s (KiloBytes/second) (-1 means no limit)
# limit_upload_speed: 150
# Set this to the notifiarr react name. This is used to add indexer reactions to the notifications sent by Notifiarr
# notifiarr:
@@ -99,6 +104,7 @@ tracker:
- tag3
max_ratio: 5.0
max_seeding_time: 129600
+ min_seeding_time: 30400
limit_upload_speed: 150
notifiarr: avistaz
beyond-hd:
@@ -141,6 +147,9 @@ tracker:
notifiarr: torrentleech
tv-vault:
tag: TV-Vault
+ # The "other" key is a special keyword and if defined will tag any other trackers that don't match the above trackers into this tag
+ other:
+ tag: other
nohardlinks:
# Tag Movies/Series that are not hard linked
@@ -152,7 +161,7 @@ nohardlinks:
- Beyond-HD
- AnimeBytes
- MaM
- # cleanup var: WARNING!! Setting this as true Will remove and delete contents of any torrents that are in paused state and has the NoHL tag
+ # cleanup var: WARNING!! Setting this as true Will remove and delete contents of any torrents that have a noHL tag and meets share limits
cleanup: false
# max_ratio var: Will set the torrent Maximum share ratio until torrent is stopped from seeding/uploading
max_ratio: 4.0
@@ -160,16 +169,18 @@ nohardlinks:
max_seeding_time: 86400
# Limit Upload Speed var: Will limit the upload speed KiB/s (KiloBytes/second) (`-1` : No Limit)
limit_upload_speed:
- # min seeding time var: Will ensure that torrent is not deleted by cleanup variable if torrent does not meet minimum seeding time (min).
+ # min seeding time var: Will prevent torrent deletion by cleanup variable if torrent has not yet minimum seeding time (min).
+ # Delete this key from a category's config to use the tracker's configured min_seeding_time. Will default to 0 if not specified for the category or tracker.
min_seeding_time: 43200
-
+ # resume_torrent_after_untagging_noHL var: If a torrent was previously tagged as NoHL and now has hardlinks, this variable will resume your torrent after changing share limits
+ resume_torrent_after_untagging_noHL: false
# Can have additional categories set with separate ratio/seeding times defined.
series-completed:
# exclude_tags var: Will exclude torrents with any of the following tags when searching through the category.
exclude_tags:
- Beyond-HD
- BroadcasTheNet
- # cleanup var: WARNING!! Setting this as true Will remove and delete contents of any torrents that are in paused state and has the NoHL tag
+ # cleanup var: WARNING!! Setting this as true Will remove and delete contents of any torrents that have a noHL tag and meets share limits
cleanup: false
# max_ratio var: Will set the torrent Maximum share ratio until torrent is stopped from seeding/uploading
max_ratio: 4.0
@@ -177,14 +188,16 @@ nohardlinks:
max_seeding_time: 86400
# Limit Upload Speed var: Will limit the upload speed KiB/s (KiloBytes/second) (`-1` : No Limit)
limit_upload_speed:
- # min seeding time var: Will ensure that torrent is not deleted by cleanup variable if torrent does not meet minimum seeding time (min).
- min_seeding_time: 43200
+ # min seeding time var: Will prevent torrent deletion by cleanup variable if torrent has not yet minimum seeding time (min).
+ # min_seeding_time: # Not specified for this category; tracker's value will be used. Will default to 0 if not specified for the category or tracker.
+ # resume_torrent_after_untagging_noHL var: If a torrent was previously tagged as NoHL and now has hardlinks, this variable will resume your torrent after changing share limits
+ resume_torrent_after_untagging_noHL: false
recyclebin:
# Recycle Bin method of deletion will move files into the recycle bin (Located in /root_dir/.RecycleBin) instead of directly deleting them in qbit
# By default the Recycle Bin will be emptied on every run of the qbit_manage script if empty_after_x_days is defined.
enabled: true
- # empty_after_x_days var:
+ # empty_after_x_days var:
# Will automatically remove all files and folders in recycle bin after x days. (Checks every script run)
# If this variable is not defined it, the RecycleBin will never be emptied.
# WARNING: Setting this variable to 0 will delete all files immediately upon script run!
@@ -194,7 +207,7 @@ recyclebin:
# This will save a copy of your .torrent and .fastresume file in the recycle bin before deleting it from qbittorrent
save_torrents: true
# split_by_category var:
- # This will split the recycle bin folder by the save path defined in the `cat` attribute
+ # This will split the recycle bin folder by the save path defined in the `cat` attribute
# and add the base folder name of the recycle bin that was defined in the `recycle_bin` sub-attribute under directory.
split_by_category: false
@@ -211,6 +224,7 @@ orphaned:
- "**/@eaDir"
- "/data/torrents/temp/**"
- "**/*.!qB"
+ - '**/_unpackerred'
apprise:
# Apprise integration with webhooks
@@ -234,7 +248,7 @@ webhooks:
# Set value to notifiarr if using notifiarr integration
# Set value to apprise if using apprise integration
# Set value to a valid webhook URL
- # Leave Empty/Blank to disable
+ # Set value to nothing (leave Empty/Blank) to disable
error: https://mywebhookurl.com/qbt_manage
run_start: notifiarr
run_end: apprise
@@ -253,192 +267,211 @@ bhd:
# BHD Integration used for checking unregistered torrents
apikey:
```
+
# **List of variables**
## **commands:**
----
-This section will ignore any commands that are defined via environment varialbe or command line and use the ones defined in this yaml file instead. Useful if you want to run qbm with multiple configurations files that execute different commands for each qbt instance.
-| Variable | Definition | Required
-| :------------ | :------------ | :------------
-| `command` | The command that you want qbm to execute.| ❌
+---
+This section will ignore any commands that are defined via environment variable or command line and use the ones defined in this yaml file instead. Useful if you want to run qbm with multiple configurations files that execute different commands for each qbt instance.
+| Variable | Definition | Required |
+| :-------- | :---------------------------------------- | :----------------- |
+| `command` | The command that you want qbm to execute. | ❌ |
## **qbt:**
+
---
This section defines your qBittorrent instance.
-| Variable | Definition | Required
-| :------------ | :------------ | :------------
-| `host`| IP address of your qB installation.|✅
-| `user` | The user name of your qB's webUI.| ❌
-| `pass` | Thee password of your qB's webUI.| ❌
+| Variable | Definition | Required |
+| :------- | :---------------------------------- | :----------------- |
+| `host` | IP address of your qB installation. | ✅ |
+| `user` | The user name of your qB's webUI. | ❌ |
+| `pass` | Thee password of your qB's webUI. | ❌ |
## **settings:**
+
---
This section defines any settings defined in the configuration.
-| Variable | Definition | Required
-| :------------ | :------------ | :------------
-| `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`)| ❌
-| `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.| ❌
+| Variable | Definition | Required |
+| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------- |
+| `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`) | ❌ |
+| `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:**
+
---
This section defines the directories that qbit_manage will be looking into for various parts of the script.
-| Variable | Definition | Required
-| :------------ | :------------ | :------------
-| `cross_seed` | Output directory of cross-seed, originally the application [cross-seed](https://github.com/mmgoodnow/cross-seed) was incapable of injecting cross-seed torrent into qB, this was built to inject them for the applicaiton. This is no longer required if you're using injects with that software. However, you can find othere uses for this as it is more of a watch directory now.| QBT_CROSS_SEED
-| `root_dir` | Root downloads directory used to check for orphaned files, noHL, and remove unregistered. This directory is where you place all your downloads. This will need to be how qB views the directory where it places the downloads. This is required if you're using qbit_managee and/or qBittorrent within a container.| QBT_REM_ORPHANED / QBT_TAG_NOHARDLINKS / QBT_REM_UNREGISTERED
-| `remote_dir` | Path of docker host mapping of root_dir, this must be set if you're running qbit_manage locally (not required if running qbit_manage in a container) and qBittorrent/cross_seed is in a docker. Essentially this is where your downloads are being kept on the host. |❌
-| `recycle_bin` | Path of the RecycleBin folder. Default location is set to `remote_dir/.RecycleBin`. |❌
-| `torrents_dir` | Path of the your qbittorrent torrents directory. Required for `save_torrents` attribute in recyclebin `/qbittorrent/data/BT_backup`. |❌
-| `orphaned_dir` | Path of the Orphaned Directory folder. Default location is set to `remote_dir/orpahaned_data`. |❌
+| Variable | Definition | Required |
+| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------ |
+| `cross_seed` | Output directory of cross-seed, originally the application [cross-seed](https://github.com/mmgoodnow/cross-seed) was incapable of injecting cross-seed torrent into qB, this was built to inject them for the application. This is no longer required if you're using injects with that software. However, you can find other uses for this as it is more of a watch directory now. | QBT_CROSS_SEED |
+| `root_dir` | Root downloads directory used to check for orphaned files, noHL, and remove unregistered. This directory is where you place all your downloads. This will need to be how qB views the directory where it places the downloads. This is required if you're using qbit_managee and/or qBittorrent within a container. | QBT_REM_ORPHANED / QBT_TAG_NOHARDLINKS / QBT_REM_UNREGISTERED |
+| `remote_dir` | Path of docker host mapping of root_dir, this must be set if you're running qbit_manage locally (not required if running qbit_manage in a container) and qBittorrent/cross_seed is in a docker. Essentially this is where your downloads are being kept on the host. | ❌ |
+| `recycle_bin` | Path of the RecycleBin folder. Default location is set to `remote_dir/.RecycleBin`. | ❌ |
+| `torrents_dir` | Path of the your qbittorrent torrents directory. Required for `save_torrents` attribute in recyclebin `/qbittorrent/data/BT_backup`. | ❌ |
+| `orphaned_dir` | Path of the Orphaned Directory folder. Default location is set to `remote_dir/orphaned_data`. | ❌ |
+
## **cat:**
+
---
This section defines the categories that you are currently using and the path's that are associated with them.
> **NOTE** ALL categories must be defined, if it is in your qBit, then it **MUST** be defined here, if not the script will throw errors.
-| Configuration | Definition | Required
-| :------------ | :------------ | :------------
-| `key`| Name of the category|✅
-| `value` | Save Path of the category| ✅
+| Configuration | Definition | Required |
+| :------------ | :------------------------ | :----------------- |
+| `key` | Name of the category | ✅ |
+| `value` | Save Path of the category | ✅ |
The syntax for all the categories are as follows
+
```yaml
category: //category
```
+
## **cat_change:**
+
---
This moves all the torrents from one category to another category if the torrents are marked as complete.
> **NOTE** **WARNING**: if the paths are different and Default Torrent Management Mode is set to automatic the files could be moved !!!
-| Configuration | Definition | Required
-| :------------ | :------------ | :------------
-| `key`| Name of the original category|✅
-| `value` | Name of the new category| ✅
+| Configuration | Definition | Required |
+| :------------ | :---------------------------- | :----------------- |
+| `key` | Name of the original category | ✅ |
+| `value` | Name of the new category | ✅ |
The syntax for the categories are as follows
+
```yaml
old_category_name: new_category_name
```
+
## **tracker:**
+
---
This section defines the tags used based upon the tracker's URL.
-| Configuration | Definition | Required
-| :------------ | :------------ | :------------
-| `key`| Tracker URL Keyword |✅
-
-| 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 | ❌
+| Configuration | Definition | Required |
+| :------------ | :------------------ | :----------------- |
+| `key` | Tracker URL Keyword | ✅ |
+
+| 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 associateed 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.
+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:**
+
---
-Hardlinking data allows you to have your data in both the torrent directory and your media direectory at the same time without using double the amount of data.
+Hardlinking data allows you to have your data in both the torrent directory and your media direectory at the same time without using double the amount of data.
If you're needing information regarding hardlinks here are some excellent resources.
[](https://www.youtube.com/watch?v=AMcHsQJ7My0)
-* [Trash-Guides: Hardlinks and Instant Moves (Atomic-Moves)](https://trash-guides.info/Hardlinks/Hardlinks-and-Instant-Moves/)
+* [Trash-Guides: Hardlinks and Instant Moves (Atomic-Moves)](https://trash-guides.info/Hardlinks/Hardlinks-and-Instant-Moves/)
* [Wikipedia: Hardlinks](https://en.wikipedia.org/wiki/Hard_link)
-Mandatory to fill out [directory parameter](#directory) above to use this function (root_dir/remote_dir)
+Mandatory to fill out [directory parameter](#directory) above to use this function (root_dir/remote_dir)
Beyond this you'll need to use one of the [categories](#cat) above as the key, and should be pointed to the `completed-` directory of your torrents.
-| Configuration | Definition | Required
-| :------------ | :------------ | :------------
-| `key`| Category name of your completed movies/completed series in qbit. |✅
+| Configuration | Definition | Required |
+| :------------ | :--------------------------------------------------------------- | :----------------- |
+| `key` | Category name of your completed movies/completed series in qbit. | ✅ |
-| 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)| 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 | ❌
+| 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) | 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 | ❌ |
## **recyclebin:**
+
---
- Recycle Bin method of deletion will move files into the recycle bin (Located in /root_dir/.RecycleBin) instead of directly deleting them in qbit.
+ Recycle Bin method of deletion will move files into the recycle bin (Located in /root_dir/.RecycleBin) instead of directly deleting them in qbit.
- This is very useful if you're hesitant about using this script to delete information off your system hingswithout first checking it. Plus with the ability of this script to remove trumped/unregistered torrents there is a very small chance that something may happen to cause the script to go to town on your library. With the recycling bin in place your data is secure (unless the bin is emptied before this issue is caught). All you'd need to do to recover would be to place the data back into the correct directory, redownload the torrent file from the tracker and recheck the torrent with the tracker from the UI.
+ This is very useful if you're hesitant about using this script to delete information off your system hingswithout first checking it. Plus with the ability of this script to remove trumped/unregistered torrents there is a very small chance that something may happen to cause the script to go to town on your library. With the recycling bin in place your data is secure (unless the bin is emptied before this issue is caught). All you'd need to do to recover would be to place the data back into the correct directory, redownload the torrent file from the tracker and recheck the torrent with the tracker from the UI.
-| Variable | Definition | Default Values| Required
-| :------------ | :------------ | :------------ | :------------
-|`enable`| `true` or `false` | `true` | ✅
-| `empty_after_x_days` | Will delete Recycle Bin contents if the files have been in the Recycle Bin for more than x days. (Uses date modified to track the time)| None | ❌
-| `save_torrents` | This will save a copy of your .torrent and .fastresume file in the recycle bin before deleting it from qbittorrent. This requires the [torrents_dir](#directory) to be defined| False | ❌
-| `split_by_category` | This will split the recycle bin folder by the save path defined in the [cat](#cat) attribute and add the base folder name of the recycle bin that was defined in [recycle_bin](#directory)| False | ❌
+| Variable | Definition | Default Values | Required |
+| :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------- | :----------------- |
+| `enable` | `true` or `false` | `true` | ✅ |
+| `empty_after_x_days` | Will delete Recycle Bin contents if the files have been in the Recycle Bin for more than x days. (Uses date modified to track the time) | None | ❌ |
+| `save_torrents` | This will save a copy of your .torrent and .fastresume file in the recycle bin before deleting it from qbittorrent. This requires the [torrents_dir](#directory) to be defined | False | ❌ |
+| `split_by_category` | This will split the recycle bin folder by the save path defined in the [cat](#cat) attribute and add the base folder name of the recycle bin that was defined in [recycle_bin](#directory) | False | ❌ |
> Note: The more time you place for the `empty_after_x_days:` variable the better, allowing you more time to catch any mistakes by the script. If the variable is set to `0` it will delete contents immediately after every script run. If the variable is not set it will never delete the contents of the Recycle Bin.
## **orphaned:**
+
---
This section allows for the exclusion of certain files from being considered "Orphaned"
This is handy when you have automatically generated files that certain OSs decide to make. `.DS_Store` Is a primary example, for those who use MacOS.
-| Variable | Definition | Default Values| Required
-| :------------ | :------------ | :------------ | :------------
-| `empty_after_x_days` | Will delete Orphaned data contents if the files have been in the Orphaned data for more than x days. (Uses date modified to track the time)| None | ❌
-|`exclude_patterns`| List of [patterns](https://commandbox.ortusbooks.com/usage/parameters/globbing-patterns) to exclude certain files from orphaned | None | ❌
+| Variable | Definition | Default Values | Required |
+| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------ | :------------- | :----------------- |
+| `empty_after_x_days` | Will delete Orphaned data contents if the files have been in the Orphaned data for more than x days. (Uses date modified to track the time) | None | ❌ |
+| `exclude_patterns` | List of [patterns](https://commandbox.ortusbooks.com/usage/parameters/globbing-patterns) to exclude certain files from orphaned | None | ❌ |
> Note: The more time you place for the `empty_after_x_days:` variable the better, allowing you more time to catch any mistakes by the script. If the variable is set to `0` it will delete contents immediately after every script run. If the variable is not set it will never delete the contents of the Orphaned Data.
## **apprise:**
+
---
[Apprise](https://github.com/caronc/apprise) integration is used in conjunction with webhooks to allow notifications via apprise-api.
-| Variable | Definition | Default Values| Required
-| :------------ | :------------ | :------------ | :------------
-|`api_url`| Apprise API Endpoint URL | N/A | ✅
-|`notify_url`| [Notification Services URL](https://github.com/caronc/apprise/wiki) | N/A | ✅
+| Variable | Definition | Default Values | Required |
+| :----------- | :------------------------------------------------------------------ | :------------- | :----------------- |
+| `api_url` | Apprise API Endpoint URL | N/A | ✅ |
+| `notify_url` | [Notification Services URL](https://github.com/caronc/apprise/wiki) | N/A | ✅ |
## **notifiarr:**
+
---
[Notifiarr](https://notifiarr.com/) integration is used in conjunction with webhooks to allow discord notifications via Notifiarr.
-| Variable | Definition | Default Values| Required
-| :------------ | :------------ | :------------ | :------------
-|`apikey`| Notifiarr API Key | N/A | ✅
-|`instance`| Optional unique value used to identify your instance. (could be your username on notifiarr for example)| N/A | ❌
+| Variable | Definition | Default Values | Required |
+| :--------- | :------------------------------------------------------------------------------------------------------ | :------------- | :----------------- |
+| `apikey` | Notifiarr API Key | N/A | ✅ |
+| `instance` | Optional unique value used to identify your instance. (could be your username on notifiarr for example) | N/A | ❌ |
## **webhooks:**
+
---
Provide webhook notifications based on event triggers
-| Variable | Notification Sent | Default Values| Required
-| :------------ | :------------ | :------------ | :------------
-|[error](#error-notifications)| When errors occur during the run | N/A | ❌
-|[run_start](#run-start-notifications)| At the beginning of every run | N/A | ❌
-|[run_end](#run-end-notifications)| At the end of every run | N/A | ❌
-|[cross_seed](#cross-seed-notifications)| During the cross-seed function | N/A | ❌
-|[recheck](#recheck-notifications)| During the recheck function| N/A | ❌
-|[cat_update](#category-update-notifications)| During the category update function | N/A | ❌
-|[tag_update](#tag-update-notifications)| During the tag update function | N/A | ❌
-|[rem_unregistered](#remove-unregistered-torrents-notifications)| During the removing unregistered torrents function | N/A | ❌
-|[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 | ❌
-|[cleanup_dirs](#cleanup-directories-notifications)| When files are deleted from certain directories | N/A | ❌
-
+| Variable | Notification Sent | Default Values | Required |
+| :-------------------------------------------------------------- | :------------------------------------------------------------------- | :------------- | :----------------- |
+| [error](#error-notifications) | When errors occur during the run | N/A | ❌ |
+| [run_start](#run-start-notifications) | At the beginning of every run | N/A | ❌ |
+| [run_end](#run-end-notifications) | At the end of every run | N/A | ❌ |
+| [cross_seed](#cross-seed-notifications) | During the cross-seed function | N/A | ❌ |
+| [recheck](#recheck-notifications) | During the recheck function | N/A | ❌ |
+| [cat_update](#category-update-notifications) | During the category update function | N/A | ❌ |
+| [tag_update](#tag-update-notifications) | During the tag update function | N/A | ❌ |
+| [rem_unregistered](#remove-unregistered-torrents-notifications) | During the removing unregistered torrents function | N/A | ❌ |
+| [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 | ❌ |
+| [cleanup_dirs](#cleanup-directories-notifications) | When files are deleted from certain directories | N/A | ❌ |
### **Error Notifications**
+
Payload will be sent on any errors
-```yaml
+
+```json
{
"function": "run_error", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -447,9 +480,12 @@ Payload will be sent on any errors
"type": str // severity of error
}
```
+
### **Run Start Notifications**
+
Payload will be sent at the start of the run
-```yaml
+
+```json
{
"function": "run_start", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -458,9 +494,12 @@ Payload will be sent at the start of the run
"dry_run": bool // Dry-Run
}
```
+
### **Run End Notifications**
+
Payload will be sent at the end of the run
-```yaml
+
+```json
{
"function": "run_end", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -488,8 +527,10 @@ Payload will be sent at the end of the run
```
### **Cross-Seed Notifications**
+
Payload will be sent when adding a cross-seed torrent to qBittorrent if the original torrent is complete
-```yaml
+
+```json
{
"function": "cross_seed", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -501,8 +542,10 @@ Payload will be sent when adding a cross-seed torrent to qBittorrent if the orig
"torrent_tracker": str // Torrent Tracker
}
```
+
Payload will be sent when there are existing torrents found that are missing the cross-seed tag
-```yaml
+
+```json
{
"function": "tag_cross_seed", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -515,8 +558,10 @@ Payload will be sent when there are existing torrents found that are missing the
```
### **Recheck Notifications**
+
Payload will be sent when rechecking/resuming a torrent that is paused
-```yaml
+
+```json
{
"function": "recheck", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -529,8 +574,10 @@ Payload will be sent when rechecking/resuming a torrent that is paused
```
### **Category Update Notifications**
+
Payload will be sent when updating torrents with missing category
-```yaml
+
+```json
{
"function": "cat_update", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -543,8 +590,10 @@ Payload will be sent when updating torrents with missing category
```
### **Tag Update Notifications**
+
Payload will be sent when updating torrents with missing tag
-```yaml
+
+```json
{
"function": "tag_update", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -561,8 +610,10 @@ Payload will be sent when updating torrents with missing tag
```
### **Remove Unregistered Torrents Notifications**
+
Payload will be sent when Unregistered Torrents are found
-```yaml
+
+```json
{
"function": "rem_unregistered", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -575,9 +626,12 @@ Payload will be sent when Unregistered Torrents are found
"torrents_deleted_and_contents": bool, // Deleted Torrents and contents or Deleted just the torrent
}
```
+
### **Tag Tracker Error Notifications**
+
Payload will be sent when trackers with errors are tagged/untagged
-```yaml
+
+```json
{
"function": "tag_tracker_error", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -590,7 +644,8 @@ Payload will be sent when trackers with errors are tagged/untagged
"notifiarr_indexer": str, // Notifiarr React name/id for indexer
}
```
-```yaml
+
+```json
{
"function": "untag_tracker_error", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -604,8 +659,10 @@ Payload will be sent when trackers with errors are tagged/untagged
```
### **Remove Orphaned Files Notifications**
+
Payload will be sent when Orphaned Files are found and moved into the orphaned folder
-```yaml
+
+```json
{
"function": "rem_orphaned", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -615,9 +672,12 @@ Payload will be sent when Orphaned Files are found and moved into the orphaned f
"total_orphaned_files": int, // Total number of orphaned files found
}
```
+
### **Tag No Hardlinks Notifications**
+
Payload will be sent when no hard links are found for any files in a particular torrent
-```yaml
+
+```json
{
"function": "tag_nohardlinks", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -632,8 +692,10 @@ Payload will be sent when no hard links are found for any files in a particular
"torrent_limit_upload_speed": int // Set the the torrent upload speed limit
}
```
+
Payload will be sent when hard links are found for any torrents that were previously tagged with `noHL`
-```yaml
+
+```json
{
"function": "untag_nohardlinks", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -650,7 +712,8 @@ Payload will be sent when hard links are found for any torrents that were previo
```
Payload will be sent when `cleanup` flag is set to true and `noHL` torrent meets share limit criteria.
-```yaml
+
+```json
{
"function": "cleanup_tag_nohardlinks", // Webhook Trigger keyword
"title": str, // Title of the Payload
@@ -663,9 +726,12 @@ Payload will be sent when `cleanup` flag is set to true and `noHL` torrent meets
"torrents_deleted_and_contents": bool, // Deleted Torrents and contents or Deleted just the torrent
}
```
+
### **Cleanup directories Notifications**
+
Payload will be sent when files are deleted/cleaned up from the various folders
-```yaml
+
+```json
{
"function": "cleanup_dirs", // Webhook Trigger keyword
"location": str, // Location of the folder that is being cleaned
@@ -678,9 +744,10 @@ Payload will be sent when files are deleted/cleaned up from the various folders
```
## **bhd:**
+
---
BHD integration is used if you are on the private tracker BHD. (Used to identify any unregistered torrents from this tracker)
-| Variable | Definition | Default Values| Required
-| :------------ | :------------ | :------------ | :------------
-|`apikey`| BHD API Key | N/A | ✅
+| Variable | Definition | Default Values | Required |
+| :------- | :---------- | :------------- | :----------------- |
+| `apikey` | BHD API Key | N/A | ✅ |
diff --git a/Docker-Installation.md b/Docker-Installation.md
index 1664b21..4628838 100644
--- a/Docker-Installation.md
+++ b/Docker-Installation.md
@@ -1,4 +1,4 @@
-Docker Installation
+# Docker Installation
A simple Dockerfile is available in this repo if you'd like to build it yourself. The official build is also available from dockerhub [here](https://hub.docker.com/r/bobokun/qbit_manage):
@@ -10,38 +10,38 @@ A simple Dockerfile is available in this repo if you'd like to build it yourself
* Use quotes around the whole thing if your path has spaces i.e. -v ":/config:rw"
* Fill out your location for your downloads downloads folder (`Root_Dir`).
- 1. qbit_manage needs to be able to view all torrents the way that your qbittorrent views them.
+ 1. qbit_manage needs to be able to view all torrents the way that your qbittorrent views them.
1. Example: If you have qbittorrent mapped to `/mnt/user/data/:/data` This means that you **MUST** have qbit_managed mapped the same way.
2. Furthermore, the config file must map the root directory you wish to monitor. This means that in our example of `/data` (which is how qbittorrent views the torrents) that if in your `/data` directory you drill down to `/torrents` that you'll need to update your config file to `/data/torrents`
2. This could be different depending on your specific setup.
- 3. The key takeaways are
+ 3. The key takeaways are
1. Both qbit_manage needs to have the same mappings as qbittorrent
2. The config file needs to drill down (if required) further to the desired root dir.
-* `remote_dir`: is not required and can be commented out with `#`
-
-Below is a list of the docker enviroment variables
-| Docker Environment Variable |Description | Default Value |
-| :------------ | :------------ | :------------ |
-| QBT_RUN |Run without the scheduler. Script will exit after completion. | False |
-| QBT_SCHEDULE | Schedule to run every x minutes. (Default set to 30) | 30 |
-| QBT_CONFIG | This is used if you want to use a different name for your config.yml. `Example: tv.yml` | config.yml |
-| QBT_LOGFILE | This is used if you want to use a different name for your log file. `Example: tv.log` | activity.log |
-| QBT_CROSS_SEED | Use this after running [cross-seed script](https://github.com/mmgoodnow/cross-seed) to add torrents from the cross-seed output folder to qBittorrent | False |
-| QBT_RECHECK | Recheck paused torrents sorted by lowest size. Resume if Completed. | False |
-| QBT_CAT_UPDATE | Use this if you would like to update your categories or move from one category to another.. | False |
-| QBT_TAG_UPDATE | Use this if you would like to update your tags. (Only adds tags to untagged torrents) | False |
-| QBT_REM_UNREGISTERED | Use this if you would like to remove unregistered torrents. (It will the delete data & torrent if it is not being cross-seeded, otherwise it will just remove the torrent without deleting data) | False |
-| QBT_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 |
-| QBT_TAG_TRACKER_ERROR | Use this to tag any torrents with tracker errors, such as unregistered torrents or unreachable trackers. | False |
-| QBT_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 |
-| QBT_SKIP_CLEANUP | Use this to skip emptying the Reycle Bin folder (`/root_dir/.RecycleBin`) and Orphaned directory. (`/root_dir/orphaned_data`) | False |
-| QBT_DRY_RUN | If you would like to see what is gonna happen but not actually move/delete or tag/categorize anything. | False |
-| QBT_LOG_LEVEL | Change the ouput log level. | INFO |
-| QBT_DIVIDER | Character that divides the sections (Default: '=') | = |
-| QBT_WIDTH | Screen Width (Default: 100) | 100 |
+* `remote_dir`: is not required and can be commented out with `#`
+Below is a list of the docker environment variables
+| Docker Environment Variable | Description | Default Value |
+| :-------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ |
+| QBT_RUN | Run without the scheduler. Script will exit after completion. | False |
+| QBT_SCHEDULE | Schedule to run every x minutes. (Default set to 30) | 30 |
+| QBT_CONFIG | This is used if you want to use a different name for your config.yml. `Example: tv.yml` | config.yml |
+| QBT_LOGFILE | This is used if you want to use a different name for your log file. `Example: tv.log` | activity.log |
+| QBT_CROSS_SEED | Use this after running [cross-seed script](https://github.com/mmgoodnow/cross-seed) to add torrents from the cross-seed output folder to qBittorrent | False |
+| QBT_RECHECK | Recheck paused torrents sorted by lowest size. Resume if Completed. | False |
+| QBT_CAT_UPDATE | Use this if you would like to update your categories or move from one category to another.. | False |
+| QBT_TAG_UPDATE | Use this if you would like to update your tags. (Only adds tags to untagged torrents) | False |
+| QBT_REM_UNREGISTERED | Use this if you would like to remove unregistered torrents. (It will the delete data & torrent if it is not being cross-seeded, otherwise it will just remove the torrent without deleting data) | False |
+| QBT_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 |
+| QBT_TAG_TRACKER_ERROR | Use this to tag any torrents with tracker errors, such as unregistered torrents or unreachable trackers. | False |
+| QBT_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 |
+| QBT_SKIP_CLEANUP | Use this to skip emptying the Recycle Bin folder (`/root_dir/.RecycleBin`) and Orphaned directory. (`/root_dir/orphaned_data`) | False |
+| QBT_DRY_RUN | If you would like to see what is gonna happen but not actually move/delete or tag/categorize anything. | False |
+| QBT_LOG_LEVEL | Change the output log level. | INFO |
+| QBT_DIVIDER | Character that divides the sections (Default: '=') | = |
+| QBT_WIDTH | Screen Width (Default: 100) | 100 |
Here is an example of a docker compose
+
```yaml
version: "3.7"
services:
@@ -71,6 +71,7 @@ services:
- QBT_WIDTH=100
restart: unless-stopped
```
+
You will also need to define not just the config volume but the volume to your torrents, this is in order to use the recycling bin, remove orphans and the no hard link options
Here we have `/mnt/user/data/torrents/` mapped to `/data/torrents/` furthermore in the config file associated with it the root_dir is mapped to `/data/torrents/`
diff --git a/Home.md b/Home.md
index 32c1ca7..b4bddd9 100644
--- a/Home.md
+++ b/Home.md
@@ -1,41 +1,43 @@
# qBit_manage Wiki
+
This wiki should tell you everything you need to know about the script to get it working.
## Getting Started
+
1. Install qbit_manage either by installing Python3.8.1+ on the localhost and following the [Local Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Local-Installations) Guide or by installing Docker and following the [Docker Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Docker-Installation) Guide or the [unRAID Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Unraid-Installation) Guide.
-2. Once installed, you have to [set up your Configuration](https://github.com/StuffAnThings/qbit_manage/wiki/Config-Setup) by create a [Configuration File](https://github.com/StuffAnThings/qbit_manage/blob/master/config/config.yml.sample) filled with all your values to connect to your qBittorrent instance.
+2. Once installed, you have to [set up your Configuration](https://github.com/StuffAnThings/qbit_manage/wiki/Config-Setup) by create a [Configuration File](https://github.com/StuffAnThings/qbit_manage/blob/master/config/config.yml.sample) filled with all your values to connect to your qBittorrent instance.
3. Please refer to the list of [Commands](https://github.com/StuffAnThings/qbit_manage/wiki/Commands) that can be used with this tool.
## Support
+
* If you have any questions or require support please join the [Notifiarr Discord](https://discord.com/invite/AURf8Yz) and post your question under the `qbit-manage` channel.
* If you're getting an Error or have an Enhancement post in the [Issues](https://github.com/StuffAnThings/qbit_manage/issues/new).
* If you have a configuration question post in the [Discussions](https://github.com/StuffAnThings/qbit_manage/discussions/new).
* Pull Request are welcome but please submit them to the [develop branch](https://github.com/StuffAnThings/qbit_manage/tree/develop).
-
-
## Table of Contents
-- [Home](Home)
- - [Installation](Installation)
- - [unRAID Installation](Unraid-Installation)
- - [Local Installation](Local-Installations)
- - [NIX Installation](Nix-Installation)
- - [Docker Installation](Docker-Installation)
- - [Config Setup](Config-Setup)
- - [Sample Config File](Config-Setup#config-file)
- - [List of variables](Config-Setup#list-of-variables)
- - [commands](Config-Setup#commands)
- - [qbt](Config-Setup#qbt)
- - [settings](Config-Setup#settings)
- - [directory](Config-Setup#directory)
- - [cat](Config-Setup#cat)
- - [cat_changes](Config-Setup#cat_changes)
- - [tracker](Config-Setup#tracker)
- - [nohardlinks](Config-Setup#nohardlinks)
- - [recyclebin](Config-Setup#recyclebin)
- - [orphaned](Config-Setup#orphaned)
- - [apprise](Config-Setup#apprise)
- - [notifiarr](Config-Setup#notifiarr)
- - [webhooks](Config-Setup#webhooks)
- - [bhd](Config-Setup#bhd)
- - [Commands](Commands)
+
+* [Home](Home)
+ * [Installation](Installation)
+ * [unRAID Installation](Unraid-Installation)
+ * [Local Installation](Local-Installations)
+ * [NIX Installation](Nix-Installation)
+ * [Docker Installation](Docker-Installation)
+ * [Config Setup](Config-Setup)
+ * [Sample Config File](Config-Setup#config-file)
+ * [List of variables](Config-Setup#list-of-variables)
+ * [commands](Config-Setup#commands)
+ * [qbt](Config-Setup#qbt)
+ * [settings](Config-Setup#settings)
+ * [directory](Config-Setup#directory)
+ * [cat](Config-Setup#cat)
+ * [cat_changes](Config-Setup#cat_changes)
+ * [tracker](Config-Setup#tracker)
+ * [nohardlinks](Config-Setup#nohardlinks)
+ * [recyclebin](Config-Setup#recyclebin)
+ * [orphaned](Config-Setup#orphaned)
+ * [apprise](Config-Setup#apprise)
+ * [notifiarr](Config-Setup#notifiarr)
+ * [webhooks](Config-Setup#webhooks)
+ * [bhd](Config-Setup#bhd)
+ * [Commands](Commands)
diff --git a/Installation.md b/Installation.md
index 55b178f..f444563 100644
--- a/Installation.md
+++ b/Installation.md
@@ -1,7 +1,7 @@
# Installation Table of Contents
- - [Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Installation)
- - [unRAID Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Unraid-Installation)
- - [Local Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Local-Installations)
- - [NIX Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Nix-Installation)
- - [Docker Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Docker-Installation)
\ No newline at end of file
+- [Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Installation)
+ - [unRAID Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Unraid-Installation)
+ - [Local Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Local-Installations)
+ - [NIX Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Nix-Installation)
+ - [Docker Installation](https://github.com/StuffAnThings/qbit_manage/wiki/Docker-Installation)
diff --git a/Local-Installations.md b/Local-Installations.md
index 3d056a6..8df64bc 100644
--- a/Local-Installations.md
+++ b/Local-Installations.md
@@ -1,13 +1,17 @@
-* Requires `python 3`. Dependencies must be installed by running:
+# Local Installations
+
+* Requires `python 3.8.1`. Dependencies must be installed by running:
Navigate to the directory you'd liked to clone the repo into
Clone the repo
+
```bash
git clone https://github.com/StuffAnThings/qbit_manage
```
Install requirements
+
```bash
pip install -r requirements.txt
```
@@ -26,6 +30,7 @@ To run the script in an interactive terminal run:
* Fill out the config file as outlined in the [Config-Setup](https://github.com/StuffAnThings/qbit_manage/wiki/Config-Setup)
Run the script `-h` to see a list of commands
+
```bash
python qbit_manage.py -h
```
@@ -44,4 +49,4 @@ To choose the location of the Log File
```bash
python qbit_manage.py --log-file
-```
\ No newline at end of file
+```
diff --git a/Nix-Installation.md b/Nix-Installation.md
index b0cbeac..d351f91 100644
--- a/Nix-Installation.md
+++ b/Nix-Installation.md
@@ -1,3 +1,4 @@
+# \*Nix Installation
* Download the script
diff --git a/Unraid-Installation.md b/Unraid-Installation.md
index ba38e55..d6651aa 100644
--- a/Unraid-Installation.md
+++ b/Unraid-Installation.md
@@ -1,27 +1,30 @@
# Unraid Installation - Docker (Recommended)
+
Thankfully, getting qbit_manager working on unRAID is a fairly simple task. unRAID works mostly with docker containers, so the pre-built container available on docker hub works perfectly with a little configuration. To install a container from docker hub, you will need community applications - a very popular plugin for unRAID servers. If you don't already have this installed, you can install it [here](https://forums.unraid.net/topic/38582-plug-in-community-applications/)
## Basic Installation
-1. Head to the Apps tab of unRAID (Community Applications), and search qbit_manage in the upper left search box.
+
+1. Head to the Apps tab of unRAID (Community Applications), and search qbit_manage in the upper left search box.
2. Once you have searched for qbit_manage you can simply select it from the list of containers and select install.
3. The template should show all variables that can be edited.
4. Fill out your location for your downloads downloads folder (`Root_Dir`).
- 1. qbit_manage needs to be able to view all torrents the way that your qbittorrent views them.
+ 1. qbit_manage needs to be able to view all torrents the way that your qbittorrent views them.
1. Example: If you have qbittorrent mapped to `/mnt/user/data/:/data` This means that you **MUST** have qbit_managed mapped the same way.
2. Furthermore, the config file must map the root directory you wish to monitor. This means that in our example of `/data` (which is how qbittorrent views the torrents) that if in your `/data` directory you drill down to `/torrents` that you'll need to update your config file to `/data/torrents`
2. This could be different depending on your specific setup.
- 3. The key takeaways are
+ 3. The key takeaways are
1. Both qbit_manage needs to have the same mappings as qbittorrent
2. The config file needs to drill down (if required) further to the desired root dir.
5. Select what QBT env options you want to enable or disable (true/false).
6. Hit Apply, and allow unRAID to download the docker container.
7. Navigate to the Docker tab in unRAID, and stop the qbit_manage container if it has auto-started.
-8. Create the [config.yml](https://github.com/StuffAnThings/qbit_manage/blob/master/config/config.yml.sample) file as-per the [config-setup documentation](https://github.com/StuffAnThings/qbit_manage/wiki/Config-Setup) and place in the Appdata folder (`/mnt/user/appdata/qbit_manage/` in the example) **Remember to remove the .sample from the filename**
- 1. `remote_dir`: is not required and can be commented out with `#`
-9. Once finished, run the container. Voila! Logs are located in `/mnt/user/appdata/qbit_manage/logs`.
+8. Create the [config.yml](https://github.com/StuffAnThings/qbit_manage/blob/master/config/config.yml.sample) file as-per the [config-setup documentation](https://github.com/StuffAnThings/qbit_manage/wiki/Config-Setup) and place in the Appdata folder (`/mnt/user/appdata/qbit_manage/` in the example) **Remember to remove the .sample from the filename**
+ 1. `remote_dir`: is not required and can be commented out with `#`
+9. Once finished, run the container. Voila! Logs are located in `/mnt/user/appdata/qbit_manage/logs`.
# Unraid Installation - Localhost (Alternative)
+
We recommend using the Docker method to install qBit Manage but here is an alternative way to install it locally without the use of docker with the user of userscripts.
**qBit Management**
@@ -37,59 +40,64 @@ When you open it up you'll see a bunch of packages that you can install.
We
* `python-setuptools`
-To get this running in unRAID go ahead and download the repo to your computer.
+To get this running in unRAID go ahead and download the repo to your computer.
Then take all the data from the zip file and place it somewhere on your server.
An example of this would be: `/mnt/user/data/scripts/qbit/`
-Now we need to install the requirements for this script.
+Now we need to install the requirements for this script.
Head back over to **User Scripts**
Create a new script: An example of this would be `install-requirements`
In the new text field you'll need to place:
+
```bash
#!/bin/bash
echo "Installing required packages"
python3 -m pip install -r /mnt/user/path/to/requirements.txt
echo "Required packages installed"
```
+
Replace `path/to/` with your path example mines `/data/scripts/qbit/` or `/mnt/user/data/scripts/qbit/requirements.txt`
Now click **Save Changes**
-Now to set a schedule for this bash script to run.
+Now to set a schedule for this bash script to run.
Select **At First Array Start Only** This will run this script every time the array starts on every boot
Now we need to edit the config file that came with the zip file.
-
The config file should be pretty self-explanatory.
+
The config file should be pretty self-explanatory.
The only thing that must be followed is that **ALL** categories that you see in your qBit **MUST** be added to the config file with associated directories, each directory must be unique for each category.
> If you'd like a guide on setting up cross-seed on unRAID please visit [here](https://github.com/Drazzilb08/cross-seed-guide)
Now we need to go back to **User Scripts** and create our script to run this script
-**Add a new script**
+## Add a new script
You can name yours something like `auto-manage-qbittorrent`
Here is an example script:
+
```bash
#!/bin/bash
echo "Running qBitTorrent Management"
python3 /mnt/user/data/scripts/qbit/qbit_manage.py -c /mnt/user/data/scripts/qbit/config.yml -l /mnt/user/data/scripts/qbit/activity.log -r -
echo "qBitTorrent Management Completed"
```
-However, at the core, you'll want
-```
+
+However, at the core, you'll want
+
+```bash
python3 //qbit_manage.py -c //config.yml -l //activity.log -r -
```
+
if you want to change the arguments in the ``. The full list of arguments can be seen by using the `-h` command or on the README.
-
- Once you've got the config file set up you should be all set.
+ Once you've got the config file set up you should be all set.
Don't forget to set a cron schedule mines
`*/30 * * * *` <-- Runs every 30 min
**Final note:**