|
发表于 2003-5-15 12:57:05
|
显示全部楼层
很奇怪,难道是我测试用的mp3有问题?
KMp3Plugin::writeInfo中
[code:1]
strncpy(mp3.id3.title, info["id3v1.1"]["Title"] .value().toString().local8Bit(), 31);
mp3.id3.title[ 30 ] = '\0';
strncpy(mp3.id3.artist, info["id3v1.1"]["Artist"] .value().toString().local8Bit(), 31);
mp3.id3.artist[ 30 ] = '\0';
strncpy(mp3.id3.album, info["id3v1.1"]["Album"] .value().toString().local8Bit(), 31);
mp3.id3.album[ 30 ] = '\0';
strncpy(mp3.id3.year, info["id3v1.1"]["Date"] .value().toString().local8Bit(), 5);
mp3.id3.year[ 4 ] = '\0';
strncpy(mp3.id3.comment,info["id3v1.1"]["Comment"].value().toString().local8Bit(), 29);
mp3.id3.comment[ 28 ] = '\0';
[/code:1]
和readinfo中:
[code:1]
appendItem(id3group, "Title", QString::fromLocal8Bit(mp3.id3.title));
appendItem(id3group, "Artist", QString::fromLocal8Bit(mp3.id3.artist));
appendItem(id3group, "Album", QString::fromLocal8Bit(mp3.id3.album));
appendItem(id3group, "Date", QString::fromLocal8Bit(mp3.id3.year));
appendItem(id3group, "Comment", QString::fromLocal8Bit(mp3.id3.comment));
[/code:1]
都应该是没有错误的 |
|