Rename MetaTags to MetaData

This commit is contained in:
badaix 2021-12-09 22:09:32 +01:00
parent 607f1db77f
commit 8e1f92acb1
13 changed files with 54 additions and 62 deletions

View file

@ -158,21 +158,21 @@ void LibrespotStream::onStderrMsg(const std::string& line)
// Patched version
LOG(INFO, LOG_TAG) << "metadata: <" << m[1] << ">\n";
json j = json::parse(m[1].str());
Metatags meta;
Metadata meta;
meta.artist = std::vector<std::string>{j["ARTIST"].get<std::string>()};
meta.title = j["TITLE"].get<std::string>();
Properties properties;
properties.metatags = meta;
properties.metadata = std::move(meta);
setProperties(properties);
}
else if (regex_search(line, m, re_track_loaded))
{
LOG(INFO, LOG_TAG) << "metadata: <" << m[1] << ">\n";
Metatags meta;
Metadata meta;
meta.title = string(m[1]);
meta.duration = cpt::stod(m[2]) / 1000.;
Properties properties;
properties.metatags = meta;
properties.metadata = std::move(meta);
setProperties(properties);
}
}