aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-08-20 15:15:03 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-08-20 15:15:03 +0000
commit56ed78702931cb352fc12dcfa1c1565ab55699b7 (patch)
treef94659bd7fd1b1bce19439470155caaa760c25bb
parentfa0e5a0601c9aeb83747253cb6db892e011eea83 (diff)
downloadqmmp-56ed78702931cb352fc12dcfa1c1565ab55699b7.tar.gz
qmmp-56ed78702931cb352fc12dcfa1c1565ab55699b7.tar.bz2
qmmp-56ed78702931cb352fc12dcfa1c1565ab55699b7.zip
fixed vorbis tags parsing
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@106 90c681e8-e032-0410-971d-27865f9a5e38
-rw-r--r--lib/qmmp/Input/vorbis/decoder_vorbis.cpp17
1 files changed, 16 insertions, 1 deletions
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],
@@ -284,6 +284,15 @@ void DecoderVorbis::updateTags()
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=")))
tag.setValue(FileTag::TRACK, atoi (comments->user_comments[i]
@@ -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);
}