1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-29 19:11:18 +01:00

Load albumartist from flac and ogg metadata. Thanks YellowOnion

This commit is contained in:
David Sansome 2010-07-24 14:49:49 +00:00
parent 6a03641079
commit f3491add62

View File

@ -378,6 +378,9 @@ void Song::InitFromFile(const QString& filename, int directory_id) {
if ( !file->tag()->fieldListMap()["COMPOSER"].isEmpty() ) if ( !file->tag()->fieldListMap()["COMPOSER"].isEmpty() )
d->composer_ = Decode(file->tag()->fieldListMap()["COMPOSER"].front(), codec); d->composer_ = Decode(file->tag()->fieldListMap()["COMPOSER"].front(), codec);
if ( !file->tag()->fieldListMap()["ALBUMARTIST"].isEmpty() )
d->albumartist_ = Decode(file->tag()->fieldListMap()["ALBUMARTIST"].front(), codec);
if ( !file->tag()->fieldListMap()["BPM"].isEmpty() ) if ( !file->tag()->fieldListMap()["BPM"].isEmpty() )
d->bpm_ = TStringToQString(file->tag()->fieldListMap()["BPM"].front()).trimmed().toFloat(); d->bpm_ = TStringToQString(file->tag()->fieldListMap()["BPM"].front()).trimmed().toFloat();
@ -393,6 +396,9 @@ void Song::InitFromFile(const QString& filename, int directory_id) {
if (!file->xiphComment()->fieldListMap()["COMPOSER"].isEmpty()) if (!file->xiphComment()->fieldListMap()["COMPOSER"].isEmpty())
d->composer_ = Decode(file->xiphComment()->fieldListMap()["COMPOSER"].front(), codec); d->composer_ = Decode(file->xiphComment()->fieldListMap()["COMPOSER"].front(), codec);
if (!file->xiphComment()->fieldListMap()["ALBUMARTIST"].isEmpty())
d->albumartist_ = Decode(file->xiphComment()->fieldListMap()["ALBUMARTIST"].front(), codec);
if (!file->xiphComment()->fieldListMap()["BPM"].isEmpty() ) if (!file->xiphComment()->fieldListMap()["BPM"].isEmpty() )
d->bpm_ = TStringToQString( file->xiphComment()->fieldListMap()["BPM"].front() ).trimmed().toFloat(); d->bpm_ = TStringToQString( file->xiphComment()->fieldListMap()["BPM"].front() ).trimmed().toFloat();