From 56ed78702931cb352fc12dcfa1c1565ab55699b7 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 20 Aug 2007 15:15:03 +0000 Subject: fixed vorbis tags parsing git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@106 90c681e8-e032-0410-971d-27865f9a5e38 --- lib/qmmp/Input/vorbis/decoder_vorbis.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/qmmp/Input/vorbis/decoder_vorbis.cpp b/lib/qmmp/Input/vorbis/decoder_vorbis.cpp index 7e421f2fe..5dfe0b179 100644 --- a/lib/qmmp/Input/vorbis/decoder_vorbis.cpp +++ b/lib/qmmp/Input/vorbis/decoder_vorbis.cpp @@ -275,7 +275,7 @@ void DecoderVorbis::updateTags() + strlen ("title="))); else if (!strncasecmp(comments->user_comments[i], "artist=", strlen ("artist="))) - tag.setValue(FileTag::TITLE, + tag.setValue(FileTag::ARTIST, QString::fromUtf8(comments->user_comments[i] + strlen ("artist="))); else if (!strncasecmp(comments->user_comments[i], @@ -283,6 +283,15 @@ void DecoderVorbis::updateTags() tag.setValue(FileTag::ALBUM, QString::fromUtf8(comments->user_comments[i] + strlen ("album="))); + else if (!strncasecmp(comments->user_comments[i], + "comment=", strlen ("comment="))) + tag.setValue(FileTag::COMMENT, + QString::fromUtf8(comments->user_comments[i] + + strlen ("comment="))); + else if (!strncasecmp(comments->user_comments[i], + "genre=", strlen ("genre="))) + tag.setValue(FileTag::GENRE, QString::fromUtf8 (comments->user_comments[i] + + strlen ("genre="))); else if (!strncasecmp(comments->user_comments[i], "tracknumber=", strlen ("tracknumber="))) @@ -292,7 +301,13 @@ void DecoderVorbis::updateTags() "track=", strlen ("track="))) tag.setValue(FileTag::TRACK, atoi (comments->user_comments[i] + strlen ("track="))); + else if (!strncasecmp(comments->user_comments[i], + "date=", strlen ("date="))) + tag.setValue(FileTag::YEAR, atoi (comments->user_comments[i] + + strlen ("date="))); + } + tag.setValue(FileTag::LENGTH, uint(totalTime)); dispatch(tag); } -- cgit v1.2.3-13-gbd6f