DVR Recording Filename

I put together a windows batch job to parse the JSON for movies .... You can just drag and drop the mpg file or schedule to run on each mpg file. I use the old reliable Dirmon2 to to run it.

Final Destination (2000) 2020-09-12-1914.mpg.properties
Title=Final Destination (2000)
Description=Death stalks the survivors (Devon Sawa, Ali Larter, Kerr Smith) of a doomed airliner.
Year=2000
Genre=Horror/Thriller

JSON2PROPMovies.bat
CD /d "%~dp0"
set filein="%~f1"
set ext=%~x1

if %ext% EQU .mpg set jsonin=%filein:.mpg=.json%

if %ext% EQU .mpg set propin=%filein:.mpg=.mpg.properties%

SET /P jsonin=<%jsonin%
set jsonin=%jsonin:"=%

set Title=%jsonin:*,Title=%
Set Title=%Title:~1,-1%

Set Description=%jsonin:*Description:=%
set Description=%Description:Episode=}%
for /f "tokens=1 delims=}" %%a in ("%Description%") do set Description=%%a
Set Description=%Description:~0,-1%

set year=%Title:~-6%
set year=%year:~1,-1%

set Genres=%jsonin:*Genres=%
set Genres=%Genres:IsMovie=}%
for /f "tokens=1 delims=}" %%a in ("%Genres%") do set Genres=%%a
set Genres=%Genres:~2,-2%
set Genres=%Genres:,=/%

echo Title=%Title%>%propin%
echo Description=%Description%>>%propin%
echo Year=%year%>>%propin%
echo Genre=%Genres%>>%propin%

exit

1 Like

What would be great if channels had naming control similar to cTivo where you could build your own or use a preset. Ie [seriestitle]-[episode#]…..

2 Likes

Currently, my DVR recordings of Movies off a HDHR Prime source are saved with the date appended on to the end of Movie Name (Year). Is there anyway to modify this? My plex library where I transfer them too has movies within a folder named the same as the file name. Additionally, it be great if there was a way to append the video resolution of the recording on to the end of the file name. Example file name: "Avengers Infinity War (2018) - 1080p.mpg"

There’s no function to change the file name of recordings.

The current file name format is compatible with Plex. Feel free to just point Plex at the recorded movies folder and you won’t have to move anything.