Sorting with minor deletions or additions of text

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
MavSAB
Newbie
Newbie
Posts: 4
Joined: May 19th, 2025, 8:53 am

Sorting with minor deletions or additions of text

Post by MavSAB »

Is it possible to move downloaded files to specific folders as follows?

eg. The ABC Show S01E01Title of Ep 1080p WEB .nzb

would download and sort to folder:

Downloads \ ABC Show \ ABC Show Season 1 \ filename (of extracted file)

ie. deleting "The" from first sub-folder and repeating "ABC Show" in the name of the Season sub-folder.

What would be the sort string? How to make it work only on files containing the words "ABC Show"?

Thanks
Damioings
Newbie
Newbie
Posts: 1
Joined: May 20th, 2025, 8:57 pm
Contact:

Re: Sorting with minor deletions or additions of text

Post by Damioings »

To remove the word "The", you can use regex instead:
^(The\s)?(.*) → keep only the part after "The".

Depending on the tool you use, the syntax will be different, but the idea is the same.
MavSAB
Newbie
Newbie
Posts: 4
Joined: May 19th, 2025, 8:53 am

Re: Sorting with minor deletions or additions of text

Post by MavSAB »

If you can please expand on your method with a sort string.

eg. using the example above, a sort string of %sn/Series %s produces:

The ABC Show \ Series 1 \ filename (of extracted file)

Can you please provide a sort string that will produce:

ABC Show \ ABC Show Season 1 \ filename (of extracted file)
User avatar
jcfp
Release Testers
Release Testers
Posts: 1022
Joined: February 7th, 2008, 12:45 pm

Re: Sorting with minor deletions or additions of text

Post by jcfp »

I don't think sabnzbd's sorting allows for modifying variables via regular expressions or similar. The sorting does however primarily source its info from the job name, that in turn can be modified from a pre-queue script (where you do have access to all kinds of scripting and regexp powers).

Alternatively, you could use one of many third party apps to handle the sorting and library management for you; they typically are more powerful in this area because they actually know what the content of a particular job is supposed to be (unlike sabnzbd that can only do a best guess based on jobname and some metadata).
MavSAB
Newbie
Newbie
Posts: 4
Joined: May 19th, 2025, 8:53 am

Re: Sorting with minor deletions or additions of text

Post by MavSAB »

Thanks but not looking for 3rd party downloading, sorting or library management apps or scripts. Nor do I know of one that does just what I'm asking without taking over the whole process. The inbuilt sorter has the job nearly done.

Just thought there'd be a simple way for the miniscule change sought, ie. deletion of a word in a title.
User avatar
safihre
Administrator
Administrator
Posts: 5580
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Sorting with minor deletions or additions of text

Post by safihre »

The Sorter can do the easy stuff only, to prevent having to support complex things which other apps are much better at.
For your use case the pre queue script sounds like a very simple solution. Could even ask some AI to write it for you. Just tell it to follow our documentation page.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
MavSAB
Newbie
Newbie
Posts: 4
Joined: May 19th, 2025, 8:53 am

Re: Sorting with minor deletions or additions of text

Post by MavSAB »

Ok but the sorting part is mostly fine, it's the naming part, ie. removing a word from the existing name, that's the main request. How can that be done or what script achieves that?
Post Reply