From 8511f7b69489e068918efc92d02b46c0e7290044 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Tue, 30 Mar 2010 21:25:08 +0200 Subject: id3v2.2->2.4 converter; fixed id3v2.2 loader; improved id3v2 COM/COMM parser --- plugins/gtkui/trkproperties.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'plugins') diff --git a/plugins/gtkui/trkproperties.c b/plugins/gtkui/trkproperties.c index 15148049..f29faafa 100644 --- a/plugins/gtkui/trkproperties.c +++ b/plugins/gtkui/trkproperties.c @@ -260,6 +260,21 @@ on_write_tags_clicked (GtkButton *button, } deadbeef->junk_free_id3v2 (&tag24); } + else if (tag.version[0] == 2) { + DB_id3v2_tag_t tag24; + memset (&tag24, 0, sizeof (tag24)); + int res = deadbeef->junk_id3v2_convert_22_to_24 (&tag, &tag24); + if (res == -1) { + deadbeef->junk_free_id3v2 (&tag24); + goto error; + } + if (deadbeef->junk_write_id3v2 (track->fname, &tag24) < 0) { + fprintf (stderr, "failed to write 2.4 tag to %s\n", track->fname); + deadbeef->junk_free_id3v2 (&tag24); + goto error; + } + deadbeef->junk_free_id3v2 (&tag24); + } } else { -- cgit v1.2.3