NextPVR Forums

Full Version: Edit Recordings Data?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been moving recordings around and discovered the history is lost on the recordings window, although the files are still viewable on the video window.

I've managed to recreate a file based on recording-dump.xml using the contents of a directory, but refreshing this file doesn't seem to update the Recordings.

What else do I need to do to get it to look at this refreshed file? (all that is still lost is the description and channel and I can live without those...)

- Does the UID have to be in a particular format?
- Do I have to update the EPG?
- Does it need to be in a particular sort order?


Any comments much appreciated!


Cheers Smile

ps. I used SAS and DOS, code for parsing as below:

filename DIRLIST pipe 'dir "E:\__Movies" /s';

data dirlist;
length buffer $256.;
infile dirlist length=reclen;
input buffer $varying256. reclen;
run;

data i;
set dirlist;
dir=index(buffer,"Directory of ");
test=index(buffer,".mpg");
if dir>0 or test>0;
if _N_>1;
if dir>0 then do;
directory=substr(buffer,15);
end;
run;

data i (drop=dir directory id) dir (keep=directory);
set i;
id=_N_;
if mod(id,2)=0 then output dir;
else output i;
run;

data i;
set i;
if _N_>1;
id+1;
run;

data dir;
set dir;
id+1;
run;

proc sort data = i;by id;run;
proc sort data = dir;by id;run;

data i;
merge i dir;
by id;
run;

data i;
set i;
buffer=tranwrd(buffer," ","¦");
buffer=tranwrd(buffer,"¦¦ ","¦");
buffer=substr(buffer,1,(test-2));
buffer=strip(buffer);
drop id;
run;

data i2;
retain recbegin filename channel status starttime endtime title subtitle description uid
recend;
length recbegin filename channel status starttime endtime title subtitle description uid
recend $250.;
set i;
test=index(buffer," ");
test2=index(buffer,"_");
if test2>0 then do;
filename=strip(directory)||"\"||substr(buffer,test+1,test2);
title=substr(buffer,test+1,test2-(test+1));
date=substr(buffer,test2+1,8);
start=substr(buffer,test2+10,4);
end=substr(buffer,test2+14,4);
starttime=substr(date,1,4)||"-"||substr(date,5,2)||"-"||substr(date,7,2)||
" "||substr(start,1,2)||":"||substr(start,3,2)||":00";
endtime=substr(date,1,4)||"-"||substr(date,5,2)||"-"||substr(date,7,2)||
" "||substr(end,1,2)||":"||substr(end,3,2)||":00";
end;
else do;
filename=strip(directory)||"\"||substr(buffer,test+1);
title=substr(buffer,test+1);
starttime="2001-01-01 01:01:00";
endtime="2001-01-01 02:01:00";
end;
subtitle="";
status="READY";
description="";
channel="ANGELS";
uid="1000000000A00";
recbegin="<recording>";
recend="</recording>";
drop buffer test test2 date start end;
run;

data i3;
set i2;
filename="<filename>"||strip(filename)||"</filename>";
channel="<channel>"||strip(channel)||"</channel>";
status="<status>"||strip(status)||"</status>";
starttime="<starttime>"||strip(starttime)||"</starttime>";
endtime="<endtime>"||strip(endtime)||"</endtime>";
title="<title>"||strip(title)||"</title>";
subtitle="<subtitle>"||strip(subtitle)||"</subtitle>";
description="<description>"||strip(description)||"</description>";
uid="<uid>"||strip(uid)||"</uid>";
run;

filename header 'E:\SAS\Docs\header.xml';
data _NULL_;
file header;
put '<?xml version="1.0" encoding="UTF-8"?>';
put '<recordings>';
run;

filename test 'E:\SAS\Docs\test.xml';
data _NULL_;
set i3;
file test;
put " " recbegin;
put " " filename;
put " " channel;
put " " status;
put " " starttime;
put " " endtime;
put " " title;
put " " subtitle;
put " " description;
put " " uid;
put " " recend;
run;

filename footer 'E:\SAS\Docs\footer.xml';
data _NULL_;
file footer;
put '</recordings>';
run;

options noxwait;
x 'copy E:\SAS\Docs\header.xml+E:\SAS\Docs\test.xml+E:\SAS\Docs\footer.xml
C:\Progra~1\devnz\gbpvr\recording-dump.xml';
I'm not sure I understand you right, but maybe you want to import the xml file, through gbpvr-config-plugons-import recordings.
That foopin well works!!! I (and you obviously) am the man!!!

:-)
also you can import from command-line... gbpvr.exe -import