Taglib query

Lukáš Lalinský lalinsky at gmail.com
Wed Mar 23 17:54:27 CET 2011


On Wed, Mar 23, 2011 at 5:58 AM, Mike Van rhijn <mike.vanrhijn at yahoo.com> wrote:
> Hi
> Apologies if this is a repost. I don't think my mail yesterday went through
> as I was not subscribed to the list.
>
> I'm not sure if this is the right place to ask this question. If not, can
> someone please point me to the right place?

Yes, this is the right place to ask. Your mail from yesterday also
went through, it was just delayed for moderation (it usually should
only happen once, when you send something from an unsubscribed email
address for the first).

> The following is an exttract of the code I'm using:
>
[...]
> ID3v2::Tag *mp3Tag = f.ID3v2Tag();
[...]
>
> According to the logging the tag did save successfully, however upon reading
> the tag again the album field is still set to the old value before
> submitting String::null. I've also changed the code to log whether the Album
> length is detected as 0 and whether String::null is indeed submitted and it
> is. I haven't tried this with all the set methods but found the same when
> using setComment. For setComment I even tried adding
> mp3Tag->removeFrames("COMM"); which should remove all comment frames. I then
> used setComment(String::null) afterwards but was still present and had the
> old value;

I think the problem is that you are modifying only the ID3v2 tag, but
there is still data in the ID3v1 tag. TagLib currently has a piece of
code in there that copies data from the ID3v1 tag to the ID3v2 tag.
This is the probably the best behavior, but it currently works like
that. Can you try it deleting the data also from the ID3v1 tag solves
the problem?

Lukas

[1] https://github.com/taglib/taglib/blob/master/taglib/mpeg/mpegfile.cpp#L159


More information about the taglib-devel mailing list