[DB] Acousticbrainz tagging now use new setting system

This commit is contained in:
emeric
2016-05-28 23:07:28 +02:00
parent 2ea4ba7f22
commit 445f459654
2 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ Updater& Updater::instance(void)
}
Updater::Updater()
: _running(false),
: _running(true),
_scheduleTimer(_ioService)
{
_ioService.setThreadCount(1);
@@ -17,12 +17,13 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "DatabaseHighLevelCluster.hpp"
#include "config/Config.hpp"
#include "logger/Logger.hpp"
#include "database/Setting.hpp"
#include "feature/FeatureStore.hpp"
#include "DatabaseHighLevelCluster.hpp"
namespace Database {
static Cluster::pointer getCluster(std::string type, std::string value)
@@ -166,8 +167,7 @@ static std::list<std::string> getClustersFromFeature(Feature::Type& feature)
void
HighLevelCluster::processDatabaseUpdate(Updater::Stats stats)
{
bool createTags = Config::instance().getBool("tag-highlevel-acousticbrainz", false);
bool createTags = Setting::getBool(UpdaterDboSession(), "tags_highlevel_acousticbrainz", false);
LMS_LOG(DBUPDATER, INFO) << "Creating high level based clusters...";
@@ -179,8 +179,6 @@ HighLevelCluster::processDatabaseUpdate(Updater::Stats stats)
if (UpdaterQuitRequested())
return;
LMS_LOG(DBUPDATER, DEBUG) << "Processing track " << trackId;
// Get current cluster names
std::list<std::string> newClusterNames;
if (createTags)