-
Notifications
You must be signed in to change notification settings - Fork 10
Auto Sorting
FileBotTool can be set up to automatically sort newly completed torrents. This is accomplished through a simple but powerful rule system. For example, lets say we want to automatically sort documentaries that we save to a "documentaries" folder.
-
Open the FileBotTool preference pane:
As you can see, we already have a few rules set up to sort our movies and TV shows, but we're gonna add a new one.
-
First we'll need a profile we want FileBot to use for any new documentaries. We'll click on the "Add" button next to our existing profiles, and we'll be presented with a dialog that looks like this:
-
I'm going to fill out the new profile like so:
This will sort documentaries to my documentaries folder under director name\title (year). For example 'seymoure.an.introduction.2015.mkv' would be sorted to 'F:\Media\Documentaries\Ethan Hawk\Seymour An Introduction (2015).mkv'
-
Now we need to make a new rule to let FileBotTool know when to use our documentary profile. We'll click on the "Add" button next to our existing rules:
-
As you can see, the empty rule isn't very useful. We need to decide how to identify documentaries from movies or TV shows. Well, I only ever save documentaries to my "Documentaries" folder, so that seems like a good way to tell. I'll use the drop down cells on my new rule to fill it in like so:
To break these settings down a bit, lets take a closer look at the columns. The leftmost column specifies the field we're checking on each completed torrent. In this case the save_path. We could also have chosen the torrent's label, tracker, or any file path in the torrent.
The middle two columns specify both the comparison operator and the pattern we're trying to match against the field column. In our example, I'm testing the save_path to see if it contains the word "Documentaries". You can see that my other other two rules check the label to see if it matches exactly the pattern 'movies' or 'shows'. The valid comparison operators are:
- contains: is true if the pattern appears anywhere in the field
- starts with: is true only if the field starts with the pattern
- ends with: is true only if the field ends with the pattern
- is exactly: is only true if the field is an exact match with the pattern.
- matches(regex): uses regular expressions to match the field to the pattern
The final column specifies which profile we want to use if the field matches the pattern. In our case, we want to use our new documentaries profile.
-
We are almost done, but we have one final step. An important thing to know about FileBotTool's rule system is that rules are evaluated in order from top to bottom. This means that the first rule to match is the rule that gets used.
So what does this mean for us? let's look at how our rules are ordered right now:
Since my labels are automatically added based on my tracker, all of my documentaries also have the 'movie' label. That means that none of my documentaries will be correctly sorted, even if I use a save_path that contains the word Documentaries; The first rule to match will always be the 'label' == 'movies'. To fix this we need our new rule to be tested before the movie label rule. To accomplish this, all we have to do is click on our rule, and press the "Up" button, which will move our selected rule up one space. Making our final rules list look like this:
Notice that we've deliberately left the 'shows' label rule above our new rule. This is important because it's easily possible that I download a TV show that has 'Documentaries' somewhere in its save path. For example "PBS Documentaries". We want those to be correctly sorted by the TV Shows profile, and not our documentary profile. So, we simply keep it above our rule.
-
And finally, we press "OK" to commit our changes. And we're done! Any documentaries we download should now be automatically sorted!
While this system is fairly constrained, there are a lot of possibilities. Some more examples:
- specifically do not sort files from a specific tracker
- use a regex to match specific scene releases, and sort them to their own folder
- special handeling for shows filebot has trouble matching (for example 11.22.63)
- sort any torrent with a .mp3 file using Acoustid
- keep low quality "CAM" rips separate from HD rips