Increase cover image size.

This commit is contained in:
maximko 2014-09-04 18:08:17 +06:00
parent f4e0e03236
commit 2dfb7f8f4c
1 changed files with 6 additions and 1 deletions

View File

@ -495,10 +495,15 @@ Song SoundCloudService::ExtractSong(const QVariantMap& result_song) {
QVariant cover = result_song["artwork_url"];
if (cover.isValid()) {
// Increase cover size.
// See https://developers.soundcloud.com/docs/api/reference#artwork_url
QString big_cover = cover.toString().replace("large", "t500x500");
QUrl cover_url;
cover_url.setUrl(big_cover);
// SoundCloud covers URL are https, but our cover loader doesn't seem to
// deal well with https URL. Anyway, we don't need a secure connection to
// get a cover image.
QUrl cover_url = cover.toUrl();
cover_url.setScheme("http");
song.set_art_automatic(cover_url.toEncoded());
}