Page 1 of 1
Include original nzb name as a folder in TV sorting.
Posted: August 29th, 2010, 4:16 pm
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
Re: Include original nzb name as a folder in TV sorting.
Posted: August 30th, 2010, 6:35 pm
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?
Re: Include original nzb name as a folder in TV sorting.
Posted: August 31st, 2010, 8:17 pm
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
Re: Include original nzb name as a folder in TV sorting.
Posted: September 1st, 2010, 7:06 am
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
Re: Include original nzb name as a folder in TV sorting.
Posted: November 20th, 2010, 12:53 pm
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.
Re: Include original nzb name as a folder in TV sorting.
Posted: November 22nd, 2010, 1:17 pm
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.
Re: Include original nzb name as a folder in TV sorting.
Posted: November 27th, 2010, 9:04 am
by shypike
Done for 0.6.0
Re: Include original nzb name as a folder in TV sorting.
Posted: November 29th, 2010, 3:58 pm
by Laat
Nice, thank you