Re: Libgpod :Best approach to update track's metadata on Ipod

Christophe Fergeau <[email protected]> Mon, 18 Jul 2011 08:55:08 +0200
Newsgroups gmane.comp.ipod.gtkpod
Message-ID <CACw48R=kw_60SwQH-eSc8AWoC_=V-+7BUVFpfYdG2aryobDdNA@mail.gmail.com>
Hi,

2011/7/17 Liron Tal <[email protected]>:
> I've read the reference manuel and in the track object there are no update()
> method. the only method I've seen that updates the DB is itdb_write().
> I guess that's the optimal option but does it update the whole itdb on my
> Ipod or is it in some way checking the diff and updating only the changes?
> also, is there a refrence to a code example of using these methods or are
> they as straight forward as they seem?

You've got to rewrite the whole database, but the Itdb_Track you
haven't changed by yourself shouldn't be modified.

>
> Using the track object, I guess I can have it's location and than update the
> Mp3's ID3 tag.
> Is it a legit way to update metadata ? The problem is that "rating" is only
> stored in the itdb and not in a id3tag so this hack isn't really optional.

You have to modify the rating in the Itdb_Track structure if you want
the iPod to notice it. However, you could also change the mp3 tags if
you find an appropriate tag (POPM maybe?) so that the rating isn't
lost when you copy the file from your iPod to another computer.

Christophe

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev