Removed custom logger(switching to WServer's logger) + removed custom config file

This commit is contained in:
epoupon
2015-09-07 18:21:22 +02:00
parent 53c3613cf5
commit 65a8e4ba09
14 changed files with 70 additions and 298 deletions
-21
View File
@@ -26,18 +26,6 @@
namespace {
std::vector<std::string> splitStrings(const std::string& source)
{
std::vector<std::string> res;
std::istringstream oss(source);
std::string str;
while(oss >> str)
res.push_back(str);
return res;
}
bool
isFileSupported(const boost::filesystem::path& file, const std::vector<boost::filesystem::path> extensions)
{
@@ -67,15 +55,6 @@ Grabber::instance()
return instance;
}
void
Grabber::init()
{
for (const std::string& extension : splitStrings( ConfigReader::instance().getString("main.cover.file_extensions")))
_fileExtensions.push_back("." + extension);
_maxFileSize = ConfigReader::instance().getULong("main.cover.file_max_size");
}
std::vector<CoverArt>
Grabber::getFromInputFormatContext(const Av::InputFormatContext& input, std::size_t nbMaxCovers) const
{
+5 -5
View File
@@ -38,8 +38,6 @@ class Grabber
static Grabber& instance();
void init();
std::vector<boost::filesystem::path> getCoverPaths(const boost::filesystem::path& directoryPath, std::size_t nbMaxCovers = 1) const;
std::vector<CoverArt> getFromDirectory(const boost::filesystem::path& path, std::size_t nbMaxCovers = 1) const;
std::vector<CoverArt> getFromInputFormatContext(const Av::InputFormatContext& input, std::size_t nbMaxCovers = 1) const;
@@ -50,9 +48,11 @@ class Grabber
private:
Grabber();
std::vector<boost::filesystem::path> _fileExtensions;
std::size_t _maxFileSize;
std::vector<boost::filesystem::path> _preferredFileNames;
std::vector<boost::filesystem::path> _fileExtensions
= {"jpg", "jpeg"};
std::size_t _maxFileSize = 5000000;
std::vector<boost::filesystem::path> _preferredFileNames
= {"cover", "front"};
};