Include original nzb name as a folder in TV sorting.

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
kulprit
Release Testers
Release Testers
Posts: 16
Joined: October 3rd, 2009, 12:41 am

Include original nzb name as a folder in TV sorting.

Post by kulprit »

Just wondering if it is possible to include the original nzb name in my tv sorting string. I tried using %fn but it actually just creates a folder called %fn. Also even if it did work i think it would create a folder called the same as the file inside it which is not what i want.

Ideally i want Show Name\Season\NZB Name\original file name

If its not possible could it be considered to be added.

Cheers
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Include original nzb name as a folder in TV sorting.

Post by shypike »

%fn is not the NZB name, it's the episode name.
It can only be used in Season sorting.
The "NZB Name" part cannot be created.

What does your sort string look like?
kulprit
Release Testers
Release Testers
Posts: 16
Joined: October 3rd, 2009, 12:41 am

Re: Include original nzb name as a folder in TV sorting.

Post by kulprit »

Currently it is S:\%sn/Season %s

So i get S:\ Show Name\ Season #\originalfilename.ext

but i want a folder with the original nzb name after the season. Will just keep using multiple categories rather than tv sorting. Unless it gets added of course.

Cheers
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Include original nzb name as a folder in TV sorting.

Post by shypike »

Adding support for the original NZB name is bit odd.
However you can write your own simple post processing script to add it.
See: http://wiki.sabnzbd.org/user-scripts
Laat
Newbie
Newbie
Posts: 9
Joined: March 12th, 2009, 9:40 pm

Re: Include original nzb name as a folder in TV sorting.

Post by Laat »

I'm not sure if this is helping anyone, but I wanted this as well. For me it was easier to patch the tvsorter to work the way I want:

Code: Select all

*** tvsort.py	2010-11-20 18:30:17.000000000 +0100
--- ../tar/SABnzbd-0.5.6/sabnzbd/tvsort.py	2010-11-20 18:14:52.000000000 +0100
***************
*** 301,306 ****
--- 301,309 ----
          # Replace season number
          mapping.append(('%s', self.show_info['season_num']))
          mapping.append(('%0s', self.show_info['season_num_alt']))
+ 	
+ 	# Original dir name
+ 	mapping.append(('%dn', self.original_dirname))
  
          # Replace episode names
          if self.show_info['ep_name']:
With this patch applied, and the sort string "%sn/Season %0s/%dn/" the files are sorted the way I want with the directory-name intact.
eg: Show Name/Season 01/Original.Dirname.Intact/*.ext

The original dirname is the nzb-name in all the tests I've done. And if SAB changes the directory name for some reason before sorting, I trust that the reasoning behind it was sound and I want to keep it.
Last edited by Laat on November 21st, 2010, 11:40 am, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Include original nzb name as a folder in TV sorting.

Post by shypike »

I think this can be safely added to SABnzbd, it doesn't represent conflicts.
I'll add it to the next major release.
BTW: the folder name changes when it contains characters not supported by the OS.
Last edited by shypike on November 22nd, 2010, 1:18 pm, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Include original nzb name as a folder in TV sorting.

Post by shypike »

Done for 0.6.0
Laat
Newbie
Newbie
Posts: 9
Joined: March 12th, 2009, 9:40 pm

Re: Include original nzb name as a folder in TV sorting.

Post by Laat »

Nice, thank you :)
Post Reply