[mythtv] [PATCH] Music Metadata rehash.

Colin Guthrie myth at colin.guthr.ie
Sat Nov 6 17:21:04 UTC 2004


Hi all,

OK, I've finished my patch to a state where it works properly with MP3 
files (yay).

There are still a couple of things "wrong" with it, but nothing that 
affects any functionality currently in Myth.

The main things are:
1. FLAC comments would appear to be written again and again (i.e. it 
doesn't check for a comment of the same type and overwrite it, it just 
adds another one). I've not confirmed this behaviour, but the file does 
appear to just grow with each applicaiton of metadata to it! This is not 
really a problem as there is no code in Myth that will attempt to write 
to a file that already has a comment in it. It is only used immediately 
after ripping to a FLAC file. If/When Myth become a more general purpose 
media manager (e.g. for people without a PC) then this would need to be 
addressed.

2. ID3 tags will not be written to files that have no id3v2 tags already 
in them. For the same reasons as above, this is not a problem, as the 
LAME encoding process puts in a dummy id3v2 that get's overwritten when 
encoding is complete.

While not techinically "wrong", the way that Myth scans for new music 
(by using a decoder factory), could be done without the decoder class at 
all. This would require the creation of a metaio factory and just using 
the classes I've written instead, which should be more efficient.

I don't think any of the above are blokers to inclusion in CVS, as no 
functionality is lost from what's there currently.

For convenience, I've also attached a small test folder which has a 
small project .pro, a .diff and a .sh file. Running the .sh script will 
copy the new files I've created as part of this patch, and hack them 
slightly (with the .diff) to allow them to be compiled separately from 
myth such that the MetaIO stuff can be tested via a simple command line 
program, rather than part of myth (which takes way longer and can't 
check all conditions).

I hope this is suitible for CVS, but if I've done something stupid or 
there are any glaring oddnesses, please just let me know and I'll fix 
them up!

All the best.

Col.

-- 

+------------------------+
|     Colin Guthrie      |
+------------------------+
|   myth at colin.guthr.ie  |
| http://colin.guthr.ie/ |
+------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: metadata.diff.bz2
Type: application/x-bzip2
Size: 18687 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041106/effeffe0/metadata.diff.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tar.bz2
Type: application/x-bzip2
Size: 1536 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041106/effeffe0/test.tar.bin


More information about the mythtv-dev mailing list