diff --git a/src/libs/metadata/impl/TagLibTagReader.cpp b/src/libs/metadata/impl/TagLibTagReader.cpp index cdf176fc..1ddb40d0 100644 --- a/src/libs/metadata/impl/TagLibTagReader.cpp +++ b/src/libs/metadata/impl/TagLibTagReader.cpp @@ -21,6 +21,7 @@ #include +#include #include #include #include @@ -300,6 +301,16 @@ namespace lms::metadata if (!opusFile->tag()->pictureList().isEmpty()) _hasEmbeddedCover = true; } + else if (TagLib::RIFF::AIFF::File * aiffFile{ dynamic_cast(_file.file()) }) + { + if (aiffFile->hasID3v2Tag()) + { + const auto& frameListMap{ aiffFile->tag()->frameListMap() }; + + if (!frameListMap["APIC"].isEmpty()) + _hasEmbeddedCover = true; + } + } if (debug && core::Service::get()->isSeverityActive(core::logging::Severity::DEBUG)) { @@ -334,6 +345,8 @@ namespace lms::metadata _audioProperties.bitsPerSample = mp4Properties->bitsPerSample(); else if (const auto* wavePackProperties{ dynamic_cast(properties) }) _audioProperties.bitsPerSample = wavePackProperties->bitsPerSample(); + else if (const auto* aiffProperties{ dynamic_cast(properties) }) + _audioProperties.bitsPerSample = aiffProperties->bitsPerSample(); #if TAGLIB_MAJOR_VERSION >= 2 else if (const auto* dsfProperties{ dynamic_cast(properties) }) _audioProperties.bitsPerSample = dsfProperties->bitsPerSample();