mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-20 14:33:19 +01:00
Load albumartist from flac and ogg metadata. Thanks YellowOnion
This commit is contained in:
parent
6a03641079
commit
f3491add62
@ -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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user