Simplified a bit the AvInfo part

This commit is contained in:
emeric
2018-03-21 23:12:14 +01:00
parent 4683a9ef1e
commit 937729f8ff
8 changed files with 211 additions and 259 deletions
+10 -4
View File
@@ -130,12 +130,18 @@ Grabber::getCoverPaths(const boost::filesystem::path& directoryPath, std::size_t
std::vector<Image::Image>
Grabber::getFromTrack(const boost::filesystem::path& p, std::size_t nbMaxCovers) const
{
Av::MediaFile input(p);
try
{
Av::MediaFile input(p);
if (input.open())
return getFromAvMediaFile(input, nbMaxCovers);
else
return std::vector<Image::Image>();
}
catch (Av::MediaFileException& e)
{
LMS_LOG(COVER, ERROR) << "Cannot get covers from track " << p << ": " << e.what();
}
return std::vector<Image::Image>();
}
std::vector<Image::Image>