here's a nice little util i whipped up to import single shows from video library..
for those times when you lose some data or want to re-import an old show info from archives..
only works for single files at a time, i have another one that can do a whole dir, contact me if you need it..
save this as "importxml.bat" and stick it in gbpvr\third party\
and add this to your config.xml under custom ffmpeg conversions
and you're all set...
adjust line near top to have it alter your filepath for network availability..
[not necessary tho, will keep original path as-is]
for those times when you lose some data or want to re-import an old show info from archives..
only works for single files at a time, i have another one that can do a whole dir, contact me if you need it..
save this as "importxml.bat" and stick it in gbpvr\third party\
Code:
@echo off
if "%~1" == "" goto :eof
setlocal ENABLEDELAYEDEXPANSION
set newpath=%~1
rem Un'rem' next line and adjust to alter path while importing,
rem replaces first [color=Blue]path[/color] with second [color=Red]path[/color] in filename..
rem set newpath=%newpath:[b][color=Blue]e:\mpg\[/color][/b]=[b][color=Red]\\pvr\e\mpg\[/color][/b]%
echo.
echo.
echo.
echo Original name: %~1
echo New path: %newpath%
echo.
echo. Generating Recording Import data for %~nx1 to -
echo. rec-dump.xml
echo.
FOR /F "tokens=*" %%e IN ("<?xml version="1.0" encoding="UTF-8"?>") DO ECHO %%e > "%cd%\rec-dump.xml"
FOR /F "tokens=*" %%f IN ("<recordings>") DO ECHO %%f >> "%cd%\rec-dump.xml"
FOR /F "tokens=*" %%f IN (" <recording>") DO ECHO %%f >> "%cd%\rec-dump.xml"
FOR /F "tokens=*" %%f IN (" <filename>%newpath%</filename>") DO ECHO %%f >> "%cd%\rec-dump.xml"
FOR /F "usebackq tokens=* skip=3" %%I IN ("%~1:metadata.xml") DO (echo %%I >> "%cd%\rec-dump.xml")
FOR /F "tokens=*" %%l IN ("</recordings>") DO ECHO %%l >> "%cd%\rec-dump.xml"
type "%cd%\rec-dump.xml"
start /w "" "pvrx2.exe" -import:"%cd%\rec-dump.xml"
and add this to your config.xml under custom ffmpeg conversions
Code:
<Conversion name="Import metadata" exe="importxml.bat" cmd=" {SOURCE_FILE} >>imported.log" targetExtension=".SD.mpg" />
and you're all set...
adjust line near top to have it alter your filepath for network availability..
[not necessary tho, will keep original path as-is]
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie