Merge pull request #4759 from Chocobozzz/performer_tag
Add performer tag support for mpeg files
This commit is contained in:
commit
5b2adeeb49
@ -174,6 +174,10 @@ void TagReader::ReadFile(const QString& filename,
|
|||||||
Decode(map["TIT1"].front()->toString(), nullptr,
|
Decode(map["TIT1"].front()->toString(), nullptr,
|
||||||
song->mutable_grouping());
|
song->mutable_grouping());
|
||||||
|
|
||||||
|
if (!map["TOPE"].isEmpty()) // original artist/performer
|
||||||
|
Decode(map["TOPE"].front()->toString(), nullptr,
|
||||||
|
song->mutable_performer());
|
||||||
|
|
||||||
// Skip TPE1 (which is the artist) here because we already fetched it
|
// Skip TPE1 (which is the artist) here because we already fetched it
|
||||||
|
|
||||||
if (!map["TPE2"].isEmpty()) // non-standard: Apple, Microsoft
|
if (!map["TPE2"].isEmpty()) // non-standard: Apple, Microsoft
|
||||||
@ -612,6 +616,7 @@ bool TagReader::SaveFile(const QString& filename,
|
|||||||
tag);
|
tag);
|
||||||
SetTextFrame("TCOM", song.composer(), tag);
|
SetTextFrame("TCOM", song.composer(), tag);
|
||||||
SetTextFrame("TIT1", song.grouping(), tag);
|
SetTextFrame("TIT1", song.grouping(), tag);
|
||||||
|
SetTextFrame("TOPE", song.performer(), tag);
|
||||||
// Skip TPE1 (which is the artist) here because we already set it
|
// Skip TPE1 (which is the artist) here because we already set it
|
||||||
SetTextFrame("TPE2", song.albumartist(), tag);
|
SetTextFrame("TPE2", song.albumartist(), tag);
|
||||||
SetTextFrame("TCMP", std::string(song.compilation() ? "1" : "0"), tag);
|
SetTextFrame("TCMP", std::string(song.compilation() ? "1" : "0"), tag);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user