Fix ReplayGain on the client-side when using a RemoteLibrary.

This commit is contained in:
casey langen 2020-10-18 22:11:31 -07:00
parent 865880bf47
commit 1b57214ab5

View File

@ -191,12 +191,12 @@ namespace musik { namespace core { namespace library { namespace query {
auto replayGainJson = input["replayGain"];
replayGainJson = replayGainJson.is_null() ? nlohmann::json() : replayGainJson;
musik::core::sdk::ReplayGain replayGain;
replayGain.albumGain = replayGainJson.value("albumGain", 1.0f);
replayGain.albumPeak = replayGainJson.value("albumPeak", 1.0f);
replayGain.trackGain = replayGainJson.value("trackGain", 1.0f);
replayGain.trackPeak = replayGainJson.value("trackPeak", 1.0f);
output->SetReplayGain(replayGain);
}
output->SetMetadataState(MetadataState::Loaded);