mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-17 19:18:36 +01:00
Change QFileInfo::created() to birthTime(), read lyrics from MP3 files
This commit is contained in:
parent
d5ca0ca283
commit
c752d28c6a
@ -174,7 +174,7 @@ void TagReader::ReadFile(const QString &filename, pb::tagreader::SongMetadata *s
|
||||
song->set_url(url.constData(), url.size());
|
||||
song->set_filesize(info.size());
|
||||
song->set_mtime(info.lastModified().toTime_t());
|
||||
song->set_ctime(info.created().toTime_t());
|
||||
song->set_ctime(info.birthTime().toTime_t());
|
||||
|
||||
std::unique_ptr<TagLib::FileRef> fileref(factory_->GetFileRef(filename));
|
||||
if (fileref->isNull()) {
|
||||
@ -273,6 +273,12 @@ void TagReader::ReadFile(const QString &filename, pb::tagreader::SongMetadata *s
|
||||
song->set_originalyear(map["TORY"].front()->toString().substr(0, 4).toInt());
|
||||
}
|
||||
|
||||
if (!map["USLT"].isEmpty()) {
|
||||
Decode(map["USLT"].front()->toString(), nullptr, song->mutable_lyrics());
|
||||
}
|
||||
else if (!map["SYLT"].isEmpty()) {
|
||||
Decode(map["SYLT"].front()->toString(), nullptr, song->mutable_lyrics());
|
||||
}
|
||||
|
||||
if (!map["APIC"].isEmpty()) song->set_art_automatic(kEmbeddedCover);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user