NextPVR Forums

Full Version: ReInsert metadata into ts recording
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I use

more < "%~1:metadata.xml" > "%~n1.xml"

to extract the metadata from recordings prior to cutting out the adds, but it won't use the extracted xml to re-import into Recordings therefore I would like to find out how to reinsert the previously extracted metadata into the edited ts file so I can easily re-import into Recordings through settings by using the ts option
Try setting <StoreSeparateMetadataXml> to true in config.xml then you shouldn't need to extract/reinsert
did you try simply reversing the original command to re-insert? I think it should work.
I do have storeSeperateMetadata set as true, but NextPVR won't use it (or the extracted metadata which is slightly different) to import into Recordings... for the life of me I can't see why it shouldn't use the stuff it creates itself for this but it doesn't..

No I haven't tried reversing the command, but your quite right that does seem the logical thing to try..... doh!!
Just to tidy this up if anyone else finds this thread when searching for this feature in the future

I now have a MetadataExtract.bat file that is
Code:
more < "%~1:metadata.xml" > "%~n1.xml"
and a MetadataInsert.bat file that is
Code:
more < "%~n1.xml" > "%~1:metadata.xml"

all I do is drop the .ts onto whichever I need at the time & it works great...
Jaggy Wrote:(or the extracted metadata which is slightly different)

If memory serves, they are different. The embedded XML (:metadata.xml) is formatted like this:

<?xml version="1.0" encoding="UTF-8"?>
<recording>
<filename></filename>
<channel></channel>
<status></status>
<startTime></startTime>
<endTime></endTime>
<title></title>
<subtitle></subtitle>
<description></description>
<uid></uid>
<genres>
<genre></genre>
</genres>
</recording>

and the XML file with the same name is formatted like this

<Title>
<FullTitle></FullTitle>
<LocalTitle></LocalTitle>
<ProductionYear></ProductionYear>
<RunningTime></RunningTime>
<Description></Description>
<DataProvider></DataProvider>
<DataProviderId/>
<Rating></Rating>
<Covers>
<Front></Front>
</Covers>
<Genres></Genres>
</Title>
Not for recordings. Here is one of mine with StoreSeparateMetadataXml set to true:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<recording>
  <filename>S:\2 Broke Girls\2 Broke Girls_20140505_20002030.ts</filename>
  <channel>WLKYDT</channel>
  <status>READY</status>
  <startTime>2014-05-05 19:59:00</startTime>
  <endTime>2014-05-05 20:32:00</endTime>
  <channel_OID>7395</channel_OID>
  <title>2 Broke Girls</title>
  <subtitle>And the First Degree</subtitle>
  <description>When Caroline learns that Max didn&apos;t graduate high school after missing only one exam, she determines to help Max earn her diploma and reconnect with her mother.</description>
  <uid>EP014198720072</uid>
  <firstrun>true</firstrun>
  <original_air_date>2014-05-05T00:00:00.0000000</original_air_date>
  <rating>TV-14</rating>
  <audio>stereo</audio>
  <quality>HDTV</quality>
  <genres>
    <genre>Sitcom</genre>
  </genres>
</recording>

and with it set to false (embedded metadata in another recording):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<recording>
  <filename>R:\2 Broke Girls\2 Broke Girls_20130218_21002131.ts</filename>
  <channel>WLKYDT</channel>
  <status>READY</status>
  <startTime>2013-02-18 20:59:00</startTime>
  <endTime>2013-02-18 21:33:00</endTime>
  <channel_OID>912</channel_OID>
  <title>2 Broke Girls *</title>
  <subtitle>And the Broken Hip</subtitle>
  <description>Caroline and Max pay a steep price for trying to remove a street performer from the entry of their shop.</description>
  <uid></uid>
  <firstrun>true</firstrun>
  <original_air_date>2013-02-18T00:00:00.0000000</original_air_date>
  <rating>TV-14</rating>
  <audio>stereo</audio>
  <aspect>16:9</aspect>
  <quality>HDTV</quality>
  <genres>
    <genre>Comedy</genre>
  </genres>
</recording>
I can't see NextPVR using markup like

<DataProvider></DataProvider>

In any case Jaggy's scripte create the xml file from the embedded xml data stream, so it will be the embedded xml.

Martin
whurlston Wrote:Not for recordings

Yes, I was remembering Video metadata, not recordings (http://www.nextpvr.com/nwiki/pmwiki.php?...eoMetadata)
Oh poos...... after all that to get the embedded MetaData part back in the recordings, the Recordings Import .ts part is buggy & displays the wrong record times (UTC I guess) & the wrong channel logo in the details screen..... bugger poos Sad

Manually entering data into a recording-dump type file seems the only way to do it & get everything working, but that is open to all sorts of user error with all the bits that need to be entered....
Pages: 1 2 3