aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/Input/mad/decodermadfactory.cpp7
-rw-r--r--src/plugins/Input/mad/mpegmetadatamodel.cpp11
-rw-r--r--src/plugins/Input/mpc/decodermpcfactory.cpp3
3 files changed, 19 insertions, 2 deletions
diff --git a/src/plugins/Input/mad/decodermadfactory.cpp b/src/plugins/Input/mad/decodermadfactory.cpp
index 265ced841..a55627b60 100644
--- a/src/plugins/Input/mad/decodermadfactory.cpp
+++ b/src/plugins/Input/mad/decodermadfactory.cpp
@@ -208,6 +208,13 @@ QList<FileInfo *> DecoderMADFactory::createPlayList(const QString &fileName, boo
if(tag == fileRef.ID3v2Tag())
{
+ if(!fileRef.ID3v2Tag()->frameListMap()["TPE2"].isEmpty())
+ {
+ TagLib::String albumArtist;
+ albumArtist = fileRef.ID3v2Tag()->frameListMap()["TPE2"].front()->toString();
+ info->setMetaData(Qmmp::ALBUMARTIST,
+ codec->toUnicode(albumArtist.toCString(utf)).trimmed());
+ }
if(!fileRef.ID3v2Tag()->frameListMap()["TCOM"].isEmpty())
{
TagLib::String composer;
diff --git a/src/plugins/Input/mad/mpegmetadatamodel.cpp b/src/plugins/Input/mad/mpegmetadatamodel.cpp
index 49defe84f..5d040f013 100644
--- a/src/plugins/Input/mad/mpegmetadatamodel.cpp
+++ b/src/plugins/Input/mad/mpegmetadatamodel.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2009-2014 by Ilya Kotov *
+ * Copyright (C) 2009-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -206,6 +206,11 @@ const QString MpegFileTagModel::value(Qmmp::MetaData key)
case Qmmp::ARTIST:
str = m_tag->artist();
break;
+ case Qmmp::ALBUMARTIST:
+ if(m_tagType == TagLib::MPEG::File::ID3v2
+ && !m_file->ID3v2Tag()->frameListMap()["TPE2"].isEmpty())
+ str = m_file->ID3v2Tag()->frameListMap()["TPE2"].front()->toString();
+ break;
case Qmmp::ALBUM:
str = m_tag->album();
break;
@@ -265,7 +270,9 @@ void MpegFileTagModel::setValue(Qmmp::MetaData key, const QString &value)
}
//save additional tags
TagLib::ByteVector id3v2_key;
- if (key == Qmmp::COMPOSER)
+ if(key == Qmmp::ALBUMARTIST)
+ id3v2_key = "TPE2"; //album artist
+ else if (key == Qmmp::COMPOSER)
id3v2_key = "TCOM"; //composer
else if (key == Qmmp::DISCNUMBER)
id3v2_key = "TPOS"; //disc number
diff --git a/src/plugins/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp
index cdbc4dcd4..663daa0b2 100644
--- a/src/plugins/Input/mpc/decodermpcfactory.cpp
+++ b/src/plugins/Input/mpc/decodermpcfactory.cpp
@@ -107,6 +107,9 @@ QList<FileInfo *> DecoderMPCFactory::createPlayList(const QString &fileName, boo
if(tag)
{
TagLib::APE::Item fld;
+ if(!(fld = tag->itemListMap()["ALBUM ARTIST"]).isEmpty())
+ info->setMetaData(Qmmp::ALBUMARTIST,
+ QString::fromUtf8(fld.toString().toCString(true)).trimmed());
if(!(fld = tag->itemListMap()["COMPOSER"]).isEmpty())
info->setMetaData(Qmmp::COMPOSER,
QString::fromUtf8(fld.toString().toCString(true)).trimmed());