-
Notifications
You must be signed in to change notification settings - Fork 121
Home
- How to make a configuration file
The script uses the YAML language as the language of the configuration file. The YAML language has a clear structure, so I think it's more friendly than the JSON and easy to learn.
Look at the example please, the task block can be divided into 3 parts.
# A task block
my_task: # Part 1: Task Name
# Part 2: Login Information
client: qbittorrent
host: http://127.0.0.1:9091
username: admin
password: adminadmin
# Part 3: Strategies Block (Remove Conditions)
strategies:
strategy1: # Part I: Strategy Name
# Part II: Filters
categories:
- IPT
# Part III: Remove Condition
ratio: 1
seeding_time: 1209600
delete_data: true
strategy2:
all_categories: true
excluded_categories:
- IPT
seeding_time: 259200
delete_data: true
# Add more strategies here...
# Add more tasks here...
Centainly, the configuration file can contain more than one task blocks, and a task block can contain more than one strategy blocks. Each task block represents a BT client, and each strategy block represents a kind of torrents.
Just name your task. Note that there can be no space on the left.
This script works with your client's WebUI, and this part is your login inforamtion.
- client: Your client name. Now it supports qbittorrent/transmission/μTorrent.
- host: The URL of your client's WebUI, and the URL must have a socket (http:// or https://).
- username: The username of the WebUI.
- password: The password of the WebUI.
This part contains strategy blocks. Each strategy block can be divided into 3 parts, too.
Just name your strategy like the task name.
This strategy is available only for the torrents you chosen. There are 6 filters available.
- all_trackers/all_categories: Choose all the trackers/categories.
- categories: Choose those torrents whose category is in the list.
- excluded_categories: Don't choose these torrents whose category is in the list.
- trackers: Choose those torrents whose tracker is in the list.
- excluded_trackers: Don't choose these torrents whose tracker is in the list.
The result of each filter is a set of torrents. Note that if the categories and the trackers filter are both specificed, the script will take the intersection of the two sets, and subtracts set excluded_categories and set excluded_trackers.
There are 4 remove conditions. Note that as long as a chosen torrent satisfies one of these conditions, it will be removed.
- ratio: Maximum ratio.
- create_time: The maximum time elapsed since the torrent was added to the client, in seconds. When a torrent reaches the limit, it will be removed (no matter what state it is).
- seeding_time: Maximum seeding time of a torrent.
-
seed_size: Calculate the total size of the torrents you chosen. If the total size exceeds the limit, some of the torrents will be removed. The following two properties must be specificed.
-
limit: Limit of the total size, in GiB.
-
action: Determine which torrents will be removed. Can be the following values:
Value Description remove-old-seeds Try to remove old seeds. remove-new-seeds Try to remove new seeds. remove-big-seeds Try to remove large seeds. remove-small-seeds Try to remove small seeds.
-
Determine whether to delete data at the same time. If this field isn't specificed, the default value is false.