[mb-devel] Re: [mb-experts] libtunepimp python write wma

Lukáš Lalinský lalinsky at gmail.com
Sun Feb 25 13:10:19 UTC 2007


On Ne, 2007-02-25 at 13:22 +0100, Mark Baas wrote:
> Hi,
> I read that tunepimp has the ability to write wma metadata. I have tried 
> to figure out to write this with picard, but i seem to get no luck. The 
> thing i basically do is (in Python):
> tp = tunepimp.Tunepimp()
> tp.addFile(path, 1)
> id = self.tp.getFileIds()[0]
> tr = self.tp.getTrack(id)
> tp.lock()
> md = tr.getLocalMetadata()
> tp.unlock()
> md.artist = "Nodoboy"
> tp.lock()
> tr.setLocalMetadata(md)
> tp.unlock()
> tp.ReleaseTrack(tr)
> tp.writeTags([id])
> 
> The tag doesnt change. Only when i do tr.setStatus(tunepimp.eVerified) 
> before setLocalMetadata, it just wipes the track.
> Maybe someone can provide me a example how to set this up right.

You need to modify server metadata, not local metadata. Local metadata
are supposed to be read-only from application's point of view.

But libtunepimp is really not a general purpose tagging library. If you
want to simply write WMA tags from a Python script, I'd suggest to try
Mutagen instead:

http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.musicbrainz.org/pipermail/musicbrainz-devel/attachments/20070225/36561de6/attachment.pgp


More information about the MusicBrainz-devel mailing list