-
-
Notifications
You must be signed in to change notification settings - Fork 46
Organizing Your Torrents Made Easy
Managing a large collection of torrents can feel like trying to organize a messy closet. Just as you’d sort clothes by type or season, you can organize your torrents into specific folders using directory configurations. This document will guide you to set up an efficient media collection.
Think of directory configuration as setting up labeled bins in your closet. Each bin (directory) holds specific types of items (torrents) based on rules you define. These rules ensure that every torrent finds its rightful place automatically, keeping your collection neat and accessible.
Directories are like the labeled bins in your closet. Each directory name represents a specific category where related torrents will be stored.
directories:
movies:
...
music:
...
Groups are broader categories that help organize directories into larger sections. For example, both movies and music can belong to a "Media" group, similar to having a media section in your closet.
group: media
Group order determines the priority of directories within a group. Lower numbers mean higher priority, ensuring that torrents are sorted into the most specific bins first.
group_order: 10
Filters are the rules that decide which torrents go into which directories. They act like sorting criteria, such as size, type, or name patterns.
filters:
- regex: /pattern/
- size_gte: 1000000000
Additional options provide extra control over how torrents are organized, such as only showing the largest file in a torrent.
only_show_the_biggest_file: true
Start by listing all the categories you want to organize your torrents into. Each directory represents a specific type of torrent.
directories:
movies:
...
music:
...
shows:
...
anime:
...
Group similar directories together to keep your configuration tidy. For instance, all media-related directories can be part of the "Media" group.
movies:
group: media
music:
group: media
Determine the sorting priority within each group. Directories with lower group_order
values are processed first, ensuring that torrents are sorted into the most specific category available.
movies:
group_order: 10
music:
group_order: 20
Filters are the criteria that torrents must meet to be placed in a specific directory. Think of them as the rules you set for what goes into each bin.
-
Regex Filters: Match torrent or file names based on specific patterns.
Analogy: Like recognizing shirts with a certain logo.
- regex: /\b\d{4}\b/ # Matches a 4-digit year
-
Contains Filters: Look for specific substrings in torrent names.
Analogy: Sorting shirts that contain the word "Sale".
- contains: "mp3"
-
Size Constraints: Filter torrents based on their size.
Analogy: Putting bulky winter coats in a separate bin.
- size_gte: 5000000000 # Files larger than 5GB
-
Media Information Filters: Use metadata like resolution or bitrate.
Analogy: Sorting clothes by fabric quality.
- media_info_resolution: "1080p"
Use logical operators to create complex rules.
-
AND: All conditions must be true.
Analogy: A shirt must be both red AND have a logo.
- and: - contains: "1080p" - size_gte: 1000000000
-
OR: At least one condition must be true.
Analogy: A shirt can be either red OR blue.
- or: - contains: "1080p" - contains: "720p"
Organize music files by their extensions.
music:
group_order: 5
group: media
filters:
- any_file_inside_regex: /.+\.mp3$/i
- any_file_inside_regex: /.+\.flac$/i
Explanation: Torrents containing .mp3
or .flac
files go into the music
directory.
Sort anime torrents using unique naming patterns.
anime:
group_order: 10
group: media
filters:
- regex: /\b[a-fA-F0-9]{8}\b/
- any_file_inside_regex: /\b[a-fA-F0-9]{8}\b/
Explanation: Torrents with an 8-character hexadecimal code in their name are placed in the anime
directory.
Automatically sort TV show episodes.
shows:
group_order: 20
group: media
filters:
- has_episodes: true
Explanation: Torrents detected to contain episodes (like TV shows) go into the shows
directory.
Catch-all for movie torrents, showing only the main file.
movies:
group_order: 30
group: media
only_show_the_biggest_file: true
filters:
- regex: /.*/
Explanation: All other torrents are assigned to movies
, displaying only the largest file, typically the main movie.
Manage storage by separating large torrents.
large_files:
group_order: 40
group: sizes
filters:
- size_gte: 5000000000 # Files larger than 5GB
Explanation: Torrents larger than 5GB are placed in the large_files
directory.
Decide how to categorize your torrents. Common categories include:
- Media: Movies, TV Shows, Music, Anime
- Documents: eBooks, PDFs
- Software: Applications, Games
For each category, create a directory entry in your YAML configuration.
directories:
movies:
group_order: 10
group: media
filters:
- regex: /\b\d{4}\b/ # Matches a 4-digit year
music:
group_order: 20
group: media
filters:
- any_file_inside_regex: /.+mp3$/i
- any_file_inside_regex: /.+flac$/i
Set up rules to specify what goes into each directory.
-
Movies: Look for torrents with a year in the name.
- regex: /\b\d{4}\b/
-
Music: Match files ending with
.mp3
or.flac
.- any_file_inside_regex: /.+mp3$/i - any_file_inside_regex: /.+flac$/i
Assign group_order
values to prioritize directories.
group_order: 5 # Higher priority
group_order: 10 # Lower priority
Download a few torrents that match your criteria to ensure they're assigned correctly. Check the logs if torrents aren't being placed as expected.
Based on your experience, tweak your filters or add new directories to cover additional categories.
- Start Simple: Begin with broad categories and add specific rules as needed.
- Use Descriptive Names: Clearly name your directories and groups for easy identification.
- Test Regular Expressions: Ensure your regex patterns accurately match the intended torrent names.
-
Prioritize Carefully: Assign lower
group_order
values to directories with stricter criteria to avoid overlaps. - Avoid Overlapping Filters: Make sure each filter is distinct to prevent torrents from being assigned to multiple directories unintentionally.
-
Use Case Sensitivity Wisely: Add
/i
to regex patterns to make them case-insensitive when necessary.
-
Combine Logical Operators: Create complex filtering rules using
and
andor
.filters: - and: - regex: /pattern1/ - contains: "specific_word" - or: - size_gte: 1048576 - has_episodes: true
-
Leverage Media Metadata: Filter based on resolution, bitrate, duration, or language.
media_info_resolution: "1080p" media_info_bit_rate_gte: 5000000 # 5 Mbps
-
Manage File Sizes: Control storage by filtering torrents based on file sizes.
only_show_files_with_size_lte: 2147483648 # 2GB
-
Create Custom Groups: Organize directories into broader categories beyond the default ones.
group: entertainment
Organizing your torrents with directory configurations is like setting up a well-organized closet—everything has its place, making it easy to find what you need. By defining directories, assigning them to groups, and creating effective filters, you can automate the sorting process, saving time and reducing clutter. Start with simple rules, test thoroughly, and gradually incorporate more advanced configurations to tailor the system to your specific needs. Happy organizing!
(c) 2023 Debrid Media Manager