I'm trying to figure out a post processing script for TV Shows for use in windows.
These set lines are in the script:
set name=%3
set name=%name:"=%
set dirname=%1
set dirname=%dirname:"=%
The issue is that while the SORTING feature of SAB names the TV Shows how I am wanting, Show Name - S01E05.avi
PROBLEM, the issue is that when %name% is used in the script to name the file in say a HandBrakeCLI line, it renames my nice clean Show Name - S01E05.avi type name to the name of the NZB which is a messy name.
How can I change it so that the SORTING name is retained?
Thanks.
How can you use the SORTING name not NZB name?
-
- Full Member
- Posts: 146
- Joined: January 21st, 2010, 5:36 pm
-
- Full Member
- Posts: 146
- Joined: January 21st, 2010, 5:36 pm
Re: How can you use the SORTING name not NZB name?
I tried a little more on this without success, in case it helps here is what I just did.
Found the smallest size TV show I could find and in my script I added all 7 of the SABnzbd parameters:
1 The final directory of the job (full path)
2 The original name of the NZB file
3 Clean version of the job name (no path info and ".nzb" removed)
4 Newzbin report number (may be empty
5 Newzbin or user-defined category
6 Group that the NZB was posted in e.g. alt.binaries.x
7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2 (0.5.0 only!)
Here is what the output was:
1: "C:\Documents and Settings\Administrator\Desktop\TV\Aqua Teen Hunger Force"
2: Aqua.Teen.Hunger.Force.S07E05.HDTV.XviD-2HD.nzb
3: Aqua.Teen.Hunger.Force.S07E05.HDTV.XviD-2HD
4: ""
5: tv
6: alt.binaries.teevee
7: 0
I guess I thought %3 was going to be the SORTING file name that SAB used.
Please help, it will be very much apprecaited.
Found the smallest size TV show I could find and in my script I added all 7 of the SABnzbd parameters:
1 The final directory of the job (full path)
2 The original name of the NZB file
3 Clean version of the job name (no path info and ".nzb" removed)
4 Newzbin report number (may be empty
5 Newzbin or user-defined category
6 Group that the NZB was posted in e.g. alt.binaries.x
7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2 (0.5.0 only!)
Here is what the output was:
1: "C:\Documents and Settings\Administrator\Desktop\TV\Aqua Teen Hunger Force"
2: Aqua.Teen.Hunger.Force.S07E05.HDTV.XviD-2HD.nzb
3: Aqua.Teen.Hunger.Force.S07E05.HDTV.XviD-2HD
4: ""
5: tv
6: alt.binaries.teevee
7: 0
I guess I thought %3 was going to be the SORTING file name that SAB used.
Please help, it will be very much apprecaited.
-
- Full Member
- Posts: 146
- Joined: January 21st, 2010, 5:36 pm
Re: How can you use the SORTING name not NZB name?
Alright, I solved the question this thread posed with this code:
I found something very similar over on the Handbrake forums and made a slight mod to make it work, this code then trancodes the AVI file into an M4V with the same clean filename.
However, I am now dead in the water stuck trying to tag with AtomicParsley with the situation where I have an M4V file named like: Lost - S06E03.m4v in a directory and no other info. All the AtomicParsley examples use name=%1 to call the file name but since SAB doesn't pass a parameter for the SORTING file name I can't use that approach.
Looking for help on how to parse out TV Show Name, Season Number and Episode Number from: Lost - S06E03.m4v
And then have AtomicParsley write the file, Windows Batch Command.
Would appreciate the help.
Code: Select all
for /f "tokens=* delims=" %%i in ('dir/b/a-d *.avi') do (
echo Converting: %%i
echo.
echo.
%HandBrakeCLI% --input "%%i" --output "%%~ni.m4v" --preset="AppleTV" -v 0
)
However, I am now dead in the water stuck trying to tag with AtomicParsley with the situation where I have an M4V file named like: Lost - S06E03.m4v in a directory and no other info. All the AtomicParsley examples use name=%1 to call the file name but since SAB doesn't pass a parameter for the SORTING file name I can't use that approach.
Looking for help on how to parse out TV Show Name, Season Number and Episode Number from: Lost - S06E03.m4v
And then have AtomicParsley write the file, Windows Batch Command.
Would appreciate the help.