GNOME Bugzilla – Bug 166375
[PATCH] Best shows null characters in MP3 tags
Last modified: 2005-03-15 23:19:52 UTC
Please describe the problem: As seen on screenshot, tags are padded with null chars Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 37028 [details] Screenshot
I provided the filetrs to read audio file tags, bugs have been fixed since then, I will work on a new version of music tag filters, maybe it will be done this week-end.
I managed to finish the update, it has the form of a directory containing the sources files separated with each format in its subfolder. Is this a problem, or can I afford a beagle/Util/entagged-sharp directory ? (this will replace the old Filter{Ape,Mp3,Flac,Mpc,Ogg}.cs and Tag.cs currently in beagle/Util/)
Created attachment 37162 [details] [review] audioformats.patch Patch to update filters to use the new namespaces mainly. Update the Mp3 reader to correctly use v1 and/or v2. Update the Music filter to use multiple artists from tags, and miscellaneous music metadata as well. Won't generate empty properties anymore. The following files can be removed : beagle/Util/Tag.cs beagle/Util/ApeReader.cs beagle/Util/FlacReader.cs beagle/Util/OggReader.cs beagle/Util/Mp3Reader.cs The entagged-sharp package provided below has to be placed in beagle/Util/entagged-sharp to match the automake file, feel free to change...
Created attachment 37163 [details] entagged-sharp-beagle.tar.gz This is the package containing a slightly stripped version of the entagged library (the part concerning file infos like bitrate encoding type etc are removed. If needed can be readded later, also tag writing is removed.) I will maintain this port on the entagged library java homepage on sourceforge, and will provide updates when necessary.
Raf: The following lines in your patch (FilterMusic.cs, DoPullProperties ()), requires little change, as you cannot add (guys please correct me if I am wrong) duplicate keywords. foreach(TagTextField field in tag.Artist) AddProperty (Beagle.Property.New ("fixme:artist", field.Content)); If the specification of a file allows defining duplicate tags, we can take the approach like: For duplicate artists: fixme:artist = "<name-of-the-first-artist-available-in-the-tags>" fixme:artist-team = "<name-of-the-second-artist> - <name-of-the-third-artist> - ... - <name-of-the-nth-artist>". Like this we can have for albums and other tags. Jon: What do you say?
Created attachment 37178 [details] [review] audioformats-multiprop.patch Now uses a main property for first item (that will mostly always be present and be the only value in the tag) and a second property containing other values for that field if any, concatenated and separated with a defineable separator (" - " for the moment). The secondary prop names are not good, they must be changed to something cool...
Created attachment 37219 [details] [review] entagged+multiprops.patch This patch will add entagged support like before, but will also add multi proerties support for beagle, this is a rather deep change in how the API behaves, but theoretically, backward compatibility is ensured. Calls to get a property will return the first one or null if none exist (original behavior), and calls to set a property will erase any existing property with that name (thus reducing it to a 1 element property). The above changes are in Hit.cs and LuceneDriver.cs To handle these new properties in Best, i rewrote the html parser/builder that best uses (Template.cs) to also use multiple properties internally, again backward compatibility is ensured. To use the multipros in the html source a new kind of construct is introduced: This kind of statement is of the form (on an empty line): { <ul> $ <li>@Title@</li> $ </ul> $ @Title@ } Fields are "$" separated inside it 1- Header 2- Repetitive part 3- Footer 4- Part if there is only one occurence of repetitive part So in this case, it would output either AlbumTitle if there is only one album title, or <ul> <li>AlbumTitle</li> <li>Anotheralbum title</li> <li>Third title</li> </ul> if there are multiple items. This should allow a wide variety of constructions. No tiles have been updated yet to use this kind of html, but i will modify the template-music.html.cs to give a sample.
Patch looks good. Let me try it give more comments. :-)
I have tested the patch, it works fine and closes some of the bugs ;-). It is in my local tree. Can you patch template-music.html as well, so that I can commit all the changes in one go? Thanks for the patch. ;-)
Varadhan, is this patch in CVS yet? Let's close this bug if it is.
Created attachment 38717 [details] [review] Do not show album as "" when album-tag doesn't exist.
In CVS.