Writing any genres
Eivind Magnus Hvidevold
emh at kvarteret.no
Mon Jun 5 22:21:26 CEST 2006
On Sun, Jun 04, 2006 at 11:32:35PM +0200, Rene Maurer wrote:
> Hello
>
> I am using python-taglib and it is not possible for me to write my own
> genre tag to a mp3 file.
>
> Here's what I am doing:
>
> ,----
> | genre = "blabla"
> | track = TagLib.FileRef(inputFileAndPath)
> | track.tag().setGenre(genre)
> | track.save()
> `----
>
> Result: No genre tag is written. In case I am using one of the
> 'standard' tags (e.g. Blues, Rock) everything works well.
>
> Is this a problem of the python bindings or anything else (ID3v1/v2)?
ID3v1 tags contain an index into a fixed set of genres.
Use ref = MPEGFile(file) and tag = ref.ID3v2Tag(true).
--
EMH
Computer science for finite automata, microbiology for infinite tomato.
More information about the taglib-devel
mailing list