2014-10-30, 03:52 PM
I have a script that renames my recorded files to include the sub-title or episode title. I upgraded yesterday to 3.3.8 and all my recording renaming has the category in place of the sub-title, like 'Sitcom' or 'Drama'. The sub-title information is displayed correctly in NPVR and the db. Any idea what has changed or how I may need to modify my script to get it right in 3.3.8?
The renaming part of my script is as follows:
REM now let's get the show title and subtitle, then sanitize them
set subtitle=?
FOR /F "tokens=*" %%i in ('%NSHelper% -title "%~f1"') do SET title=%%i
FOR /F "tokens=*" %%i in ('%NSHelper% -subtitle "%~f1"') do SET subtitle=%%i
set title=%title:?=-%
set title=%title:/=-%
set title=%title:\=-%
set title=%title::=-%
set subtitle=%subtitle:?=-%
set subtitle=%subtitle:/=-%
set subtitle=%subtitle:\=-%
set subtitle=%subtitle::=-%
REM pull the original timestamp
echo %1 > %3.tmp
For /F "eol=; tokens=1,2,3* delims=_,." %%i in (%3.tmp) Do SET timestamp=%%j_%%k
del %3.tmp
REM now make a new name
set newname=%title%-%subtitle%-%timestamp%
The renaming part of my script is as follows:
REM now let's get the show title and subtitle, then sanitize them
set subtitle=?
FOR /F "tokens=*" %%i in ('%NSHelper% -title "%~f1"') do SET title=%%i
FOR /F "tokens=*" %%i in ('%NSHelper% -subtitle "%~f1"') do SET subtitle=%%i
set title=%title:?=-%
set title=%title:/=-%
set title=%title:\=-%
set title=%title::=-%
set subtitle=%subtitle:?=-%
set subtitle=%subtitle:/=-%
set subtitle=%subtitle:\=-%
set subtitle=%subtitle::=-%
REM pull the original timestamp
echo %1 > %3.tmp
For /F "eol=; tokens=1,2,3* delims=_,." %%i in (%3.tmp) Do SET timestamp=%%j_%%k
del %3.tmp
REM now make a new name
set newname=%title%-%subtitle%-%timestamp%