mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-06 15:53:39 +00:00
Fixed crash when attempting to query tracks by externalId only.
This commit is contained in:
parent
153cc9c708
commit
fc99911ad1
@ -542,11 +542,12 @@ bool WebSocketServer::RespondWithTracks(
|
|||||||
|
|
||||||
ITrack* track = nullptr;
|
ITrack* track = nullptr;
|
||||||
for (size_t i = 0; i < tracks->Count(); i++) {
|
for (size_t i = 0; i < tracks->Count(); i++) {
|
||||||
|
track = tracks->GetTrack(i);
|
||||||
|
|
||||||
if (idsOnly) {
|
if (idsOnly) {
|
||||||
data.push_back({ {key::id, tracks->GetId(i) } });
|
data.push_back(GetMetadataString(track, key::external_id));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
track = tracks->GetTrack(i);
|
|
||||||
data.push_back(this->ReadTrackMetadata(track));
|
data.push_back(this->ReadTrackMetadata(track));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user