write both ID3v1 and ID3v2 tags to mp3 files
This commit is contained in:
@@ -935,18 +935,12 @@ bool TagEditor::WriteTags(MPD::Song &s)
|
|||||||
ext = ext.substr(ext.rfind(".")+1);
|
ext = ext.substr(ext.rfind(".")+1);
|
||||||
ToLower(ext);
|
ToLower(ext);
|
||||||
|
|
||||||
if (ext != "mp3")
|
f.tag()->setTitle(ToWString(s.GetTitle()));
|
||||||
{
|
f.tag()->setArtist(ToWString(s.GetArtist()));
|
||||||
f.tag()->setTitle(ToWString(s.GetTitle()));
|
f.tag()->setAlbum(ToWString(s.GetAlbum()));
|
||||||
f.tag()->setArtist(ToWString(s.GetArtist()));
|
f.tag()->setYear(StrToInt(s.GetDate()));
|
||||||
f.tag()->setAlbum(ToWString(s.GetAlbum()));
|
f.tag()->setTrack(StrToInt(s.GetTrack()));
|
||||||
f.tag()->setYear(StrToInt(s.GetDate()));
|
f.tag()->setGenre(ToWString(s.GetGenre()));
|
||||||
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()->setComment(ToWString(s.GetComment()));
|
f.tag()->setComment(ToWString(s.GetComment()));
|
||||||
if (!f.save())
|
if (!f.save())
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user