mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +00:00
Fix TrackMetadataQuery.
This commit is contained in:
parent
5a08277603
commit
6cbe4ca758
@ -177,7 +177,7 @@ void TrackMetadataQuery::DeserializeResult(const std::string& data) {
|
||||
this->SetStatus(IQuery::Failed);
|
||||
auto input = nlohmann::json::parse(data);
|
||||
auto parsedResult = std::make_shared<LibraryTrack>(-1LL, this->library);
|
||||
TrackFromJson(input, parsedResult);
|
||||
TrackFromJson(input["result"], parsedResult);
|
||||
this->result = parsedResult;
|
||||
this->SetStatus(IQuery::Finished);
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ namespace musik { namespace core { namespace library { namespace query {
|
||||
track->SetValue(field, json.value(field, "").c_str());
|
||||
|
||||
void TrackFromJson(const nlohmann::json& input, musik::core::TrackPtr output, bool onlyIds) {
|
||||
output->SetId(input["id"].get<long long>());
|
||||
output->SetId(input["id"].get<int64_t>());
|
||||
COPY_JSON_FIELD_TO_TRACK(input, output, constants::Track::EXTERNAL_ID)
|
||||
COPY_JSON_FIELD_TO_TRACK(input, output, constants::Track::SOURCE_ID)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user