From 884cb0b7fb68cc4dba87651aecfc0a7b4f6a17f0 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Wed, 30 Sep 2009 21:31:46 +0200 Subject: [PATCH] write both ID3v1 and ID3v2 tags to mp3 files --- src/tag_editor.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp index e55904d1..358986e6 100644 --- a/src/tag_editor.cpp +++ b/src/tag_editor.cpp @@ -935,18 +935,12 @@ bool TagEditor::WriteTags(MPD::Song &s) ext = ext.substr(ext.rfind(".")+1); ToLower(ext); - if (ext != "mp3") - { - f.tag()->setTitle(ToWString(s.GetTitle())); - f.tag()->setArtist(ToWString(s.GetArtist())); - f.tag()->setAlbum(ToWString(s.GetAlbum())); - f.tag()->setYear(StrToInt(s.GetDate())); - f.tag()->setTrack(StrToInt(s.GetTrack())); - f.tag()->setGenre(ToWString(s.GetGenre())); - } - - // it seems that writing COMM frame to mp3 files crashes taglib - // so the comment has to be written before we write ID3v2 tags + f.tag()->setTitle(ToWString(s.GetTitle())); + f.tag()->setArtist(ToWString(s.GetArtist())); + f.tag()->setAlbum(ToWString(s.GetAlbum())); + f.tag()->setYear(StrToInt(s.GetDate())); + f.tag()->setTrack(StrToInt(s.GetTrack())); + f.tag()->setGenre(ToWString(s.GetGenre())); f.tag()->setComment(ToWString(s.GetComment())); if (!f.save()) return false;