Prepare multi cluster tag parsing

This commit is contained in:
emeric
2018-03-01 22:20:53 +01:00
parent d6f0e34b62
commit 9cf89893e0
20 changed files with 504 additions and 522 deletions
+14 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016 Emeric Poupon
* Copyright (C) 2018 Emeric Poupon
*
* This file is part of LMS.
*
@@ -19,6 +19,9 @@
#pragma once
#include <map>
#include <string>
#include "MetaData.hpp"
namespace MetaData
@@ -28,10 +31,19 @@ namespace MetaData
class TagLibParser : public Parser
{
public:
bool parse(const boost::filesystem::path& p, Items& items);
// Provide a map for TagLib name -> Cluster name
TagLibParser(const std::map<std::string, std::string>& clusterMap
= {
{"GENRE", "Genre" },
{"ALBUMGROUPING", "Group" }
});
boost::optional<Items> parse(const boost::filesystem::path& p);
private:
std::map<std::string,std::string> _clusterMap;
};
} // namespace MetaData