Hi all again,
I finally got around to trying to patch the mid3v2 script myself,
adding TXXX editing capabilities, and I think I did it right.
I don't how to submit a patch, though, so maybe some maintainer (Joe
Wreschnig?) could do this, or else hint me how to.
Anyway, what I did was the following:
I opened the file /usr/bin/mid3v2 for editing (as root).
Lines 9 and 17, in my version, are:
# $Id: mid3v2 4002 2007-04-15 18:49:32Z piman $
VERSION = (1, 1)
Between these 2 lines:
for frame, value in edits:
if frame == "COMM":
(92 and 93 in my version)
I entered this:
if frame == "TXXX":
values = value.split(":")
if len(values) == 1:
value, desc = values[0], ""
elif len(values) == 2:
desc, value = values[0], values[1]
else:
value = ":".join(values[1:-1])
desc = values[0], values[-1]
frame = mutagen.id3.TXXX(
encoding=3, text=value, desc=desc)
and before:
"-c", "--comment",
metavar='"DESCRIPTION":"COMMENT":"LANGUAGE"',
I entered this:
parser.add_option(
"-x", "--textframe", metavar='"DESCRIPTION":"TEXT"',
action="callback", help="Set a text frame", type="string",
callback=lambda *args: args[3].edits.append(("--TXXX",
args[2])))
Basically, these are edits of the COMM parts. And it works as
expected.
Maybe some maintainer would be kind enough to revise this and then add
it to the repositories. That would be great.
My version of mid3v2 is the one that is in the Ubuntu Lucid
repositories.
Thanks,
Karl Nilsson
On 26 Apr, 08:59, knilsson <
g...@heimskringla.com> wrote:
> > Hi all,
> >
> > I need to write TXXX:desc:text tags to mp3's from a bash script, and
> > it seems that the only program that does that is eyeD3. That app is
> > horribly broken though, and will corrupt the whole tag, especially if
> > the tag already contains an APIC (picture) frame, and often otherwise
> > too.
> >
> > mid3v2 is excellent in many ways but it doesn't write those TXXX tags.
> > So I wondered if there is a possibility to include this functionality
> > in the mid3v2 cli app.
> >
> > I think it would be great to have this function integrated into
> > mid3v2. Using the general syntax of mid3v2, of course.
> >
> > Cheers,
> > Karl Nilsson
> >