mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-04 05:07:48 +01:00
Adapt spotify part to qt5
This commit is contained in:
parent
98a450ad77
commit
43c98fd74e
@ -697,7 +697,7 @@ void SpotifyClient::ConvertTrack(sp_track* track, pb::spotify::Track* pb) {
|
|||||||
const QByteArray art_id(reinterpret_cast<const char*>(sp_album_cover(
|
const QByteArray art_id(reinterpret_cast<const char*>(sp_album_cover(
|
||||||
sp_track_album(track), SP_IMAGE_SIZE_LARGE)),
|
sp_track_album(track), SP_IMAGE_SIZE_LARGE)),
|
||||||
kSpotifyImageIDSize);
|
kSpotifyImageIDSize);
|
||||||
const QString art_id_b64 = QString::fromAscii(art_id.toBase64());
|
const QString art_id_b64 = QString::fromLatin1(art_id.toBase64());
|
||||||
pb->set_album_art_id(DataCommaSizeFromQString(art_id_b64));
|
pb->set_album_art_id(DataCommaSizeFromQString(art_id_b64));
|
||||||
|
|
||||||
// Artists
|
// Artists
|
||||||
@ -732,7 +732,7 @@ void SpotifyClient::ConvertAlbum(sp_album* album, pb::spotify::Track* pb) {
|
|||||||
const QByteArray art_id(
|
const QByteArray art_id(
|
||||||
reinterpret_cast<const char*>(sp_album_cover(album, SP_IMAGE_SIZE_LARGE)),
|
reinterpret_cast<const char*>(sp_album_cover(album, SP_IMAGE_SIZE_LARGE)),
|
||||||
kSpotifyImageIDSize);
|
kSpotifyImageIDSize);
|
||||||
const QString art_id_b64 = QString::fromAscii(art_id.toBase64());
|
const QString art_id_b64 = QString::fromLatin1(art_id.toBase64());
|
||||||
pb->set_album_art_id(DataCommaSizeFromQString(art_id_b64));
|
pb->set_album_art_id(DataCommaSizeFromQString(art_id_b64));
|
||||||
|
|
||||||
// URI - Blugh
|
// URI - Blugh
|
||||||
@ -979,7 +979,7 @@ void SpotifyClient::SendPlaybackError(const QString& error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SpotifyClient::LoadImage(const QString& id_b64) {
|
void SpotifyClient::LoadImage(const QString& id_b64) {
|
||||||
QByteArray id = QByteArray::fromBase64(id_b64.toAscii());
|
QByteArray id = QByteArray::fromBase64(id_b64.toLatin1());
|
||||||
if (id.length() != kSpotifyImageIDSize) {
|
if (id.length() != kSpotifyImageIDSize) {
|
||||||
qLog(Warning) << "Invalid image ID (did not decode to"
|
qLog(Warning) << "Invalid image ID (did not decode to"
|
||||||
<< kSpotifyImageIDSize << "bytes):" << id_b64;
|
<< kSpotifyImageIDSize << "bytes):" << id_b64;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user