finhsing CSpot integration

This commit is contained in:
Philippe G
2021-12-24 21:56:42 -08:00
parent e2bcb041e9
commit 7f894f1635
11 changed files with 102 additions and 89 deletions

View File

@@ -99,12 +99,13 @@ void SpotifyTrack::trackInformationCallback(std::unique_ptr<MercuryResponse> res
if (trackInfoReceived != nullptr)
{
CSPOT_LOG(info, "Calling %d", trackInfo.album.value().cover_group.value().image.size());
TrackInfo simpleTrackInfo = {
.name = trackInfo.name.value(),
.album = trackInfo.album.value().name.value(),
.artist = trackInfo.artist[0].name.value(),
.imageUrl = "https://i.scdn.co/image/" + bytesToHexString(trackInfo.album.value().cover_group.value().image[0].file_id.value())
.imageUrl = "https://i.scdn.co/image/" + bytesToHexString(trackInfo.album.value().cover_group.value().image[0].file_id.value()),
.duration = trackInfo.duration.value(),
};
trackInfoReceived(simpleTrackInfo);