Override default downloading folder based on tracker list #12268

Open
opened 2026-02-21 22:32:08 -05:00 by deekerman · 4 comments
Owner

Originally created by @lucassantilli on GitHub (Jul 15, 2021).

Feature request

Checklist

  • I have read the feature request section in the contributing guidelines, so I know how to submit a good feature request with the required information
  • I have verified that the feature I am requesting is not available in the latest version
  • (optional but recommended) I have verified that the feature I am requesting is not available in the latest CI build
  • I have checked the frequent/common issues list and searched the issue tracker for similar feature requests (including closed ones) to avoid posting a duplicate
  • This request is not a support request or question, both of which are better suited for either the discussions section, forum, or subreddit. The wiki did not contain a suitable solution either

Description

Suggestion

Add setting similar to existing Folder Monitoring, but instead of monitoring torrent files in a given directory, it will monitor added torrents and suggest a download folder IF it contains a tracker specified in the settings.

For instance, you set torrents containing the tracker "tracker.com" to be downloaded to "C:\Downloads\TrackerName".
Upon loading the torrent file, qBittorrent will check if "tracker.com" is in the tracker list and if so, the torrent management mode will be set to "Manual" and the suggested download folder will be "C:\Downloads\TrackerName" overriding default torrent management mode, tag or category settings.

Setting management mode to automatic would disregard the tracker monitoring setting and set the download folder acording to the automatic management settings.

To avoid conflicts the tracker monitoring list should be ordered by priority, whereas the first items have higher priority.

For example, monitored trackers contains the following trackers, in this specific order:
rarbg.to Folder: C:\RARBG1
rarbg.me Folder: C:\RARBG2

If qBittorrent finds "rarbg.to" in the torrent trackers, it will be used and the list stops being processed. If not, it'll look for "rarbg.me". If not found, it will look for the next item on the list until something is found or all items are processed.

Use case

Private trackers usually have specific content. Allowing users to assign different folders for different trackers helps keeping things separated and organized.

Extra info/examples/attachments

mockup

Originally created by @lucassantilli on GitHub (Jul 15, 2021). # Feature request <!-- ############################################################################### WARNING! IGNORING THE INSTRUCTIONS IN THIS TEMPLATE WILL RESULT IN THE ISSUE BEING CLOSED AS INCOMPLETE/INVALID ############################################################################### --> ## Checklist <!-- ################################## IMPORTANT ################################## As you read and fulfill each of the following requirements below, put an "x" between the square brackets to mark each task as done, like so: [x] --> - [x] I have read the **feature request section** in the [contributing guidelines](https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md), so I know how to submit a good feature request with the required information - [x] I have verified that the **feature** I am requesting is **not available** in the **[latest version](https://www.qbittorrent.org/download.php)** - [x] (optional but recommended) I have verified that the **feature** I am requesting is **not available** in the **[latest CI build](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci.yaml?query=branch%3Amaster+event%3Apush)** - [x] I have **checked the [frequent/common issues list](https://github.com/qbittorrent/qBittorrent/projects/2)** and **searched** the issue tracker for similar feature requests (including closed ones) **to avoid posting a duplicate** - [x] This request is **not a support request or question**, both of which are better suited for either the [discussions section](https://github.com/qbittorrent/qBittorrent/discussions), [forum](https://qbforums.shiki.hu/), or [subreddit](https://www.reddit.com/r/qBittorrent/). The [wiki](https://github.com/qbittorrent/qBittorrent/wiki) did not contain a suitable solution either ## Description <!-- ################################## IMPORTANT ################################## Delete each "(type here)" indicator and type your text in their place in the subsections below. You MUST fill in ALL subsections marked with "(type here)" with the appropriate information. Please make sure the description is worded well enough to be understood. Provide a detailed description of the feature and as much context and examples as necessary. If the feature request has to do with visual elements and the GUI, images/screenshots are always helpful. For more information consult the Contributing Guidelines at https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md. Use the Preview tab before posting to make sure your report looks like it is formatted properly. You don't need to delete these comments, they won't show up in the final post. --> ### Suggestion Add setting similar to existing Folder Monitoring, but instead of monitoring torrent files in a given directory, it will monitor added torrents and suggest a download folder IF it contains a tracker specified in the settings. For instance, you set torrents containing the tracker "tracker.com" to be downloaded to "C:\Downloads\TrackerName". Upon loading the torrent file, qBittorrent will check if "tracker.com" is in the tracker list and if so, the torrent management mode will be set to "Manual" and the suggested download folder will be "C:\Downloads\TrackerName" overriding default torrent management mode, tag or category settings. Setting management mode to automatic would disregard the tracker monitoring setting and set the download folder acording to the automatic management settings. To avoid conflicts the tracker monitoring list should be ordered by priority, whereas the first items have higher priority. For example, monitored trackers contains the following trackers, in this specific order: rarbg.to Folder: C:\RARBG1 rarbg.me Folder: C:\RARBG2 If qBittorrent finds "rarbg.to" in the torrent trackers, it will be used and the list stops being processed. If not, it'll look for "rarbg.me". If not found, it will look for the next item on the list until something is found or all items are processed. ### Use case Private trackers usually have specific content. Allowing users to assign different folders for different trackers helps keeping things separated and organized. ### Extra info/examples/attachments <!-- optional --> ![mockup](https://user-images.githubusercontent.com/47494251/125829524-dc7106ea-6915-46a6-a989-54ea2432850c.png)
Author
Owner

@thalieht commented on GitHub (Jul 15, 2021):

Related #3650

@thalieht commented on GitHub (Jul 15, 2021): Related #3650
Author
Owner

@WoodpeckerBaby commented on GitHub (May 25, 2023):

Very useful for private trackers. Even Transmission supports this.

@WoodpeckerBaby commented on GitHub (May 25, 2023): Very useful for private trackers. Even Transmission supports this.
Author
Owner

@chapmanjacobd commented on GitHub (Nov 16, 2024):

It's possible to use torrent watch folders with recursive manual mode and a bit of scripting to accomplish this:

github.com/chapmanjacobd/computer@657eb67cd6

Here's a simple example:

import os
import shutil
from pathlib import Path
from torrentool.api import Torrent

trackers_folders = [
    {"tracker": "tracker1.com", "folder": "normal_folder/Tracker1"},
    {"tracker": "tracker2.com", "folder": "normal_folder/Tracker2"},
    {"tracker": "tracker3.com", "folder": "special_folder/Tracker3"},
]


qbittorrent_torrent_watch_folder = ".local/data/qbit_watch/"
os.makedirs(qbittorrent_torrent_watch_folder, exist_ok=True)

for torrent_path in (Path.home() / "Downloads").glob("*.torrent"):
    torrent = Torrent.from_file(torrent_path)
    
    trackers = torrent.announce_urls
    for tracker_folder in trackers_folders:
        if any(tracker_folder["tracker"] in tracker for tracker in trackers):
            target_folder = os.path.join(qbittorrent_torrent_watch_folder, tracker_folder["folder"])
            os.makedirs(target_folder, exist_ok=True)
            shutil.move(torrent_path, os.path.join(target_folder, filename))
            print(f"Moved {filename} to {target_folder}")
            break
    else:
        print(f"No matching tracker found for {filename}")
@chapmanjacobd commented on GitHub (Nov 16, 2024): It's possible to use torrent watch folders with recursive manual mode and a bit of scripting to accomplish this: https://github.com/chapmanjacobd/computer/commit/657eb67cd6dcbef9570679232004ff06a689b878 Here's a simple example: ```py import os import shutil from pathlib import Path from torrentool.api import Torrent trackers_folders = [ {"tracker": "tracker1.com", "folder": "normal_folder/Tracker1"}, {"tracker": "tracker2.com", "folder": "normal_folder/Tracker2"}, {"tracker": "tracker3.com", "folder": "special_folder/Tracker3"}, ] qbittorrent_torrent_watch_folder = ".local/data/qbit_watch/" os.makedirs(qbittorrent_torrent_watch_folder, exist_ok=True) for torrent_path in (Path.home() / "Downloads").glob("*.torrent"): torrent = Torrent.from_file(torrent_path) trackers = torrent.announce_urls for tracker_folder in trackers_folders: if any(tracker_folder["tracker"] in tracker for tracker in trackers): target_folder = os.path.join(qbittorrent_torrent_watch_folder, tracker_folder["folder"]) os.makedirs(target_folder, exist_ok=True) shutil.move(torrent_path, os.path.join(target_folder, filename)) print(f"Moved {filename} to {target_folder}") break else: print(f"No matching tracker found for {filename}") ```
Author
Owner

@xavier2k6 commented on GitHub (May 24, 2025):

ANNOUNCEMENT!

For anybody coming across this "Feature Request" & would like/love to see a potential implementation in the future!
Here are some options available to you:

  1. Please select/click the 👍 &/orreactions in the original/opening post of this ticket.

  2. Please feel free (If you have the "skillset") to create a "Pull Request" implementing what's being requested in this ticket.
    (new/existing contributors/developers are always welcome)


DO:

  • Provide constructive feedback.
  • Display how other projects implemented same/similar etc.

DO NOT:

  • Add a "Bump", "me too", "2nd/3rd" etc. or "criticizing" comment(s).
    (These will be disregarded/hidden as "spam/abuse/off-topic" etc. as they don't provide anything constructive.)
@xavier2k6 commented on GitHub (May 24, 2025): ## ANNOUNCEMENT! For anybody coming across this **_"Feature Request"_** & would like/love to see a potential implementation in the future! **Here are some options available to you:** 1. Please select/click the 👍 **&/or** ❤ `reactions` in the original/opening post of this ticket. 2. Please feel free _(If you have the "skillset")_ to create a **_"Pull Request"_** implementing what's being requested in this ticket. **_(new/existing contributors/developers are always welcome)_** ____ **DO:** * Provide constructive feedback. * Display how other projects implemented same/similar etc. **DO NOT:** * Add a "Bump", "me too", "2nd/3rd" etc. or "criticizing" comment(s). **(These will be disregarded/hidden as "spam/abuse/off-topic" etc. as they don't provide anything constructive.)**
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#12268
No description provided.