[mythtv-users] Merge metadata from different recording

Michael T. Dean mtdean at thirdcontact.com
Tue Jun 28 21:44:20 UTC 2011


On 06/28/2011 04:57 PM, Argo Vela wrote:
> Periodically the source/guide data is incorrect and as a result
> I sometimes wind up with a situation where I have a set of
> recordings -- one with the correct recording, and another with
> the correct metadata.
>
> Is there a method (or script) floating around to apply the metadata
> from one recording to another?  Or, conversely, transfer the data
> relevant to the file&  recording to the record with the correct
> metadata?
>
> Were I to approach this programatically, my thought would be to
> isolate those fields in the recorded* tables which apply either to
> the metadata, or to the recording, then combine the correct fields
> from each set into a single record.  Would there be any other
> considerations?  Would any other tables be involved?  Would a patch
> for this be seen as sane&  useful, or is this too much of a fringe
> issue?

The best/safest approach is to simply copy the "good recording file" on 
top of the "good metadata file" (or just rename them, using a temporary 
name so you don't actually overwrite either--just to save on file system 
usage), then update the seektable ( 
http://www.mythtv.org/wiki/Repairing_the_Seektable ), then run 
mythcommflag (if you normally run mythcommflag) to detect commercials.  
Updating the seektable will take very little time (generally less than a 
minute) and commercial detection won't take too long.  Then, just delete 
the bad metadata recording using MythTV.

This could be scripted, for example using the Python bindings, which 
will allow you to submit a delete request to the backend (so it can 
delete the extra recording file and the bad metadata associated with it).

Mike


More information about the mythtv-users mailing list