getting started with ios

Scott Wheeler scott at grunge-nouveau.net
Thu Mar 27 05:34:24 UTC 2014


On Mar 26, 2014, at 7:52 PM, Christopher Scott <chris at phatfly.com> wrote:

>                  if (l[i]->toString() == “ownerEmailAddress")
>                  {
[…]
>                      tag->removeFrame(l[i]);
>                      tag->addFrame(l[i]);

This doesn’t make sense to me.  You shouldn’t need to remove and then re-add the same frame.

[…]

>                  }
>                 }
>                 if (!found)
>                 {
>                 
>                 TagLib::ID3v2::PrivateFrame *frame = new TagLib::ID3v2::PrivateFrame ();
>                  
>                     frame->setOwner("ownerEmailAddress");
>                    const TagLib::ByteVector v = TagLib::ByteVector::fromCString(UITSPayload, (uint32_t) strlen(UITSPayload));
>                    frame->setData(v);
>               
>                   tag->addFrame(frame);
>                     f.save();
>                 }

I think the main problem here is that you’re only calling save() if “found” is false.

-Scott



More information about the taglib-devel mailing list