NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 … 11 12 13 14 15 … 56 Next »
import single file metadata util

 
  • 0 Vote(s) - 0 Average
import single file metadata util
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#1
2009-03-26, 07:12 AM (This post was last modified: 2009-03-29, 10:46 PM by pBS.)
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..Smile

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} &gt;&gt;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
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Generate NextPVR import XML from recorded TV .wtv files from WMC Jimixter 5 5,551 2021-05-06, 03:34 PM
Last Post: a1blues
  PhotoFilter: New Photos/Videos plugin to browse using metadata cncb 1 2,033 2012-08-10, 04:06 PM
Last Post: cncb
  Manual RenameRecording Batch File SANGER_A2 0 2,221 2011-10-08, 11:11 AM
Last Post: SANGER_A2
  NPVR Rename Recordings Batch File raceviper13 8 8,143 2011-04-23, 11:52 PM
Last Post: raceviper13
  IRTRANS apps.cfg file crazy_gadgets 0 2,543 2010-03-05, 04:44 PM
Last Post: crazy_gadgets
  Search DB batch util pBS 4 2,582 2009-09-03, 10:01 AM
Last Post: pBS
  new tvxb ini file for sweden stefan 3 2,461 2008-01-16, 10:11 AM
Last Post: stefan
  xml file checker xanth 2 1,452 2007-11-28, 06:48 PM
Last Post: xanth
  File Renaming Tool: ZRename zehd 0 1,123 2007-05-01, 05:23 AM
Last Post: zehd
  File Renaming Utility: AddEpisode turkey 11 3,927 2007-04-30, 10:48 PM
Last Post: David

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode