Better detection of embedded covers for vorbis/opus ogg files. ref #71
This commit is contained in:
@@ -26,8 +26,10 @@
|
|||||||
#include <taglib/flacfile.h>
|
#include <taglib/flacfile.h>
|
||||||
#include <taglib/mpcfile.h>
|
#include <taglib/mpcfile.h>
|
||||||
#include <taglib/mpegfile.h>
|
#include <taglib/mpegfile.h>
|
||||||
|
#include <taglib/opusfile.h>
|
||||||
#include <taglib/tag.h>
|
#include <taglib/tag.h>
|
||||||
#include <taglib/tpropertymap.h>
|
#include <taglib/tpropertymap.h>
|
||||||
|
#include <taglib/vorbisfile.h>
|
||||||
#include <taglib/wavpackfile.h>
|
#include <taglib/wavpackfile.h>
|
||||||
|
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
@@ -399,6 +401,16 @@ TagLibParser::parse(const std::filesystem::path& p, bool debug)
|
|||||||
if (!flacFile->pictureList().isEmpty())
|
if (!flacFile->pictureList().isEmpty())
|
||||||
track.hasCover = true;
|
track.hasCover = true;
|
||||||
}
|
}
|
||||||
|
else if (TagLib::Ogg::Vorbis::File* vorbisFile {dynamic_cast<TagLib::Ogg::Vorbis::File*>(f.file())})
|
||||||
|
{
|
||||||
|
if (!vorbisFile->tag()->pictureList().isEmpty())
|
||||||
|
track.hasCover = true;
|
||||||
|
}
|
||||||
|
else if (TagLib::Ogg::Opus::File* opusFile {dynamic_cast<TagLib::Ogg::Opus::File*>(f.file())})
|
||||||
|
{
|
||||||
|
if (!opusFile->tag()->pictureList().isEmpty())
|
||||||
|
track.hasCover = true;
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto& property : properties)
|
for (const auto& property : properties)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user