SABnzbd

Wiki

User Manual FAQ Contact Introduction Installation Configuration Scripts Advanced Topics Extensions for SABnzbd

Incorrect or missing information? Sorting

External sorting tools

NOTE While SABnzbd supports a number of ways to rename files, external tools (like Sonarr, Radarr, etc.) allow for much more extensive automated download management. These tools can automatically search, add and handle renaming in almost every possible way!

Overview of available Automation Extensions for SABnzbd.


Sorting

Sorting replaces any pattern keys in the Sort String (such as %sn for the show name) with real values based on the jobname and information in the NZB, before creating the directory structure and renaming files. The Sort String and the affected categories can be set for each type of sorting (Series, Movie, and Date).


Series Sorting

For SABnzbd to know a downloaded nzb is part of a series, it needs to be named in a certain way. The more standard the naming, the better your chances of a job getting properly recognized and sorted. Common, well recognized formats for season and episode numbers include 1x01 (SeriesxEpisode) or S01E01 (SseriesEepisode).

Examples

Show Name - 1x01 - Episode Name.nzb
Show.Name.S01E01.Episode.Name.nzb
ShowName.1x01.nzb

Key

Meaning Pattern Result
Show Name %sn Show Name (case-adjusted)
%s.n Show.Name (case-adjusted)
%s_n Show_Name (case-adjusted)
Show Name %sN Show Name
%s.N Show.Name
%s_N Show_Name
Resolution %r 1080p
Year %y 2021
Decade %decade 20
%0decade 2020
Season Number %s 1
%0s 01
Episode Number %e 5
%0e 05
Episode Name %en Episode Name
%e.n Episode.Name
%e_n Episode_Name
File Extension %ext avi
Original File Name %fn filename
Original Job Name %dn foldername
Lower Case {TEXT} text

Behind the scenes, the GuessIt module does much of the sorting-related guess work. In addition to the commonly-used features above that get their own pattern keys, the full suite of GuessIt properties is exposed. The available properties depends on the installed GuessIt version and are listed in the web interface under the pattern key.

GuessIt Property %GI<property> GuessIt Property
%G.I<property> GuessIt.Property
%G_I<property> GuessIt_Property
Affected Categories Control/Shift+Select the categories you want this sorting to be used in.
Sort String The sorting expression with pattern keys, constructing a path/filename combination of your choice. See the presets/examples below.

Presets

1x01 Season Folder:
%sn/Season %s/%sn - %sx%0e - %en.%ext
Example: Show Name/Season 1/Show Name - 1x05 - Episode Name.mkv

S01E01 Season Folder:
%sn/Season %s/%sn - S%0sE%0e - %en.%ext
Example: Show Name/Season 1/Show Name - S01E05 - Episode Name.mkv

1x01 Individual Episode Folder:
%sn/%sx%0e - %en/%sn - %sx%0e - %en.%ext
Example: Show Name/1x05 - Episode Name/Show Name - 1x05 - Episode Name.mkv

S01E01 Individual Episode Folder:
%sn/S%0sE%0e - %en/%sn - S%0sE%0e - %en.%ext
Example: Show Name/S01E05 - Episode Name/Show Name - S01E05 - Episode Name.mkv

Job Name as Folder Name:
%dn.%ext
Example: Job Name.mkv

If you do not wish for any renaming to be done, just do not include that part of the path, such as instead of:
%sn/Season %s/%sn - S%0sE%0e - %en.%ext
use:
%sn/Season %s

Affected Categories
Control/Shift+Select the categories you want this sorting to be used in.


Movie Sorting

This sorting will rename large files based on the nzb name. It has support for naming files in a sequence such as CD1/CD2/CD3 A/B/C 1/2/3.

Key

Meaning Pattern Result
Movie Name %sn Movie Name (case-adjusted)
%s.n Movie.Name (case-adjusted)
%s_n Movie_Name (case-adjusted)
Title %title Movie Name
%.title Movie.Name
%_title Movie_Name
Year %y 2000
Resolution %r 1080p
Decade %decade 00
%0decade 2000
Extension %ext avi
Original File Name %fn filename
Original Job Name %dn
Lower Case {TEXT} text
Part Number %1 1

Behind the scenes, the GuessIt module does much of the sorting-related guess work. In addition to the commonly-used features above that get their own pattern keys, the full suite of GuessIt properties is exposed. The available properties depends on the installed GuessIt version and are listed in the web interface under the pattern key.

GuessIt Property %GI<property> GuessIt Property
%G.I<property> GuessIt.Property
%G_I<property> GuessIt_Property
Keep loose downloads in extra folders If the download file contains an extra folder (such as VIDEO_TS ect), it will not move the final download to the parent folder. If your downloaded jobs do not end up in their own folders, but dumped in a single folder, then enable this. It is basically to stop messy downloads cluttering up your folder full of downloads
Affected Categories Control/Shift+Select the categories you want this sorting to be used in.
Sort String The naming to use, and any extra folders for the sorting, see examples below.
Multi-part label If there is a sequence of files (such as CD1/CD2) what to to insert into sort string before .%ext. The default is " CD%1" (no quotes) which will add " CD1" before the extension for the first CD.

Presets

In folders:
%title (%y)/%title (%y).%ext
CD%1
Example: Movie Name (2000)/Movie Name (2000) CD1.mkv

No folders:
%title (%y).%ext
CD%1
Example: Movie Name (2000) CD1.mkv

Decades 1:
%0decade/%title (%y).%ext
CD%1
Example: 2000/Movie Name (2000) CD1.mkv

Decades 2:
%decade/%title (%y).%ext
CD%1
Example: 00/Movie Name (2000) CD1.mkv

Job Name as Folder Name:
%dn.%ext
Example: Job Name.mkv


Date Sorting

Date sorting will allow for renaming, and sorting of files that contain dates in their nzb name.

Detection

Most standard date formats are recognized, including:
MM-DD-YYYY/MM.DD.YYYY or YYYY-MM-DD/YYYY.MM.DD

Eg: Show.Name.12.12.2008.HDTV-RLS.nzb

Key

Meaning Pattern Result
Show Name %sn Show Name (case-adjusted)
%s.n Show.Name (case-adjusted)
%s_n Show_Name (case-adjusted)
Show Name %t Show Name
%.t Show.Name
%_t Show_Name
Year %y 2009
Decade %decade 00
%0decade 2000
Month %m 1
%0m 01
Day of month %d 2
%0d 02
Resolution %r 1080p
Original File Name %fn filename
Original Job Name %dn
Lower Case {TEXT} text

Behind the scenes, the GuessIt module does much of the sorting-related guess work. In addition to the commonly-used features above that get their own pattern keys, the full suite of GuessIt properties is exposed. The available properties depends on the installed GuessIt version and are listed in the web interface under the pattern key.

GuessIt Property %GI<property> GuessIt Property
%G.I<property> GuessIt.Property
%G_I<property> GuessIt_Property
Affected Categories Control/Shift+Select the categories you want this sorting to be used in.
Sort String The naming to use, and any extra folders for the sorting, see examples below.

Presets

Show Name folder:
%t/%t - %y-%0m-%0d - %desc.%ext
Example: Show Name/Show Name - 2009-01-02 - Episode Name.mkv

Year-Month folders:
%y-%0m/%t - %y-%0m-%0d - %desc.%ext
Example: 2009-01/Show Name - 2009-01-02 - Episode Name.mkv

Daily folders:
%y-%0m-%0d/%t - %y-%0m-%0d - %desc.%ext
Example: 2009-01-02/Show Name - 2009-01-02 - Episode Name.mkv

Job Name as Folder Name:
%dn.%ext
Example: Job Name.mkv