From 90c59078c0c4ca18a74f933811ef37571bc60d1b Mon Sep 17 00:00:00 2001 From: Jonathan Cremin Date: Sat, 6 Dec 2014 13:28:38 +0000 Subject: [PATCH] Use SSL urls for all artwork (no more protocol relative) --- lib/services/beats.js | 4 ++-- lib/services/googleplaymusic.js | 4 ++-- lib/services/itunes.js | 4 ++-- lib/services/rdio.js | 6 +++--- lib/services/spotify.js | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/services/beats.js b/lib/services/beats.js index 54ad427..aec6509 100644 --- a/lib/services/beats.js +++ b/lib/services/beats.js @@ -37,7 +37,7 @@ module.exports.lookupId = function(id) { name: result.title, streamUrl: "https://listen.beatsmusic.com/albums/" + result.id, purchaseUrl: null, - artwork: artwork.replace("http:", ""), + artwork: artwork.replace("http:", "https:"), artist: { name: result.artist_display_name } @@ -56,7 +56,7 @@ module.exports.lookupId = function(id) { name: result.title, streamUrl: "https://listen.beatsmusic.com/albums/" + result.refs.album.id + "/tracks/" + result.id, purchaseUrl: null, - artwork: artwork.replace("http:", ""), + artwork: artwork.replace("http:", "https:"), artist: { name: result.artist_display_name }, diff --git a/lib/services/googleplaymusic.js b/lib/services/googleplaymusic.js index b3e1cab..87689a3 100644 --- a/lib/services/googleplaymusic.js +++ b/lib/services/googleplaymusic.js @@ -34,7 +34,7 @@ module.exports.lookupId = function(id, type, next) { name: album.name, streamUrl: "https://play.google.com/music/listen#/album/" + album.albumId, purchaseUrl: "https://play.google.com/store/music/album?id=" + album.albumId, - artwork: album.albumArtRef.replace("http:", ""), + artwork: album.albumArtRef.replace("http:", "https:"), artist: { name: album.artist } @@ -51,7 +51,7 @@ module.exports.lookupId = function(id, type, next) { name: track.title, streamUrl: "https://play.google.com/music/listen#/track/" + track.nid + "/" + track.albumId, purchaseUrl: "https://play.google.com/store/music/album?id=" + track.albumId, - artwork: track.albumArtRef[0].url.replace("http:", ""), + artwork: track.albumArtRef[0].url.replace("http:", "https:"), album: { name: track.album }, diff --git a/lib/services/itunes.js b/lib/services/itunes.js index 0d3c36b..7e219e0 100644 --- a/lib/services/itunes.js +++ b/lib/services/itunes.js @@ -33,7 +33,7 @@ module.exports.lookupId = function(id, type) { name: result.trackName ? result.trackName : result.collectionName, streamUrl: null, purchaseUrl: result.collectionViewUrl, - artwork: "/itunes/" + result.artworkUrl100.replace("100x100", "200x200").replace("http://", ""), + artwork: "https://match.audio/itunes/" + result.artworkUrl100.replace("100x100", "200x200").replace("http://", ""), artist: { name: result.artistName } @@ -93,7 +93,7 @@ module.exports.search = function(data) { name: result.trackName ? result.trackName : result.collectionName, streamUrl: null, purchaseUrl: result.collectionViewUrl, - artwork: "/itunes/" + result.artworkUrl100.replace("100x100", "200x200").replace("http://", ""), + artwork: "https://match.audio/itunes/" + result.artworkUrl100.replace("100x100", "200x200").replace("http://", ""), artist: { name: result.artistName } diff --git a/lib/services/rdio.js b/lib/services/rdio.js index ad4b8ff..024f516 100644 --- a/lib/services/rdio.js +++ b/lib/services/rdio.js @@ -42,7 +42,7 @@ module.exports.lookupId = function(id) { name: result.name, streamUrl: result.shortUrl, purchaseUrl: null, - artwork: result.icon.replace("http:", "").replace("square-200", "square-250"), + artwork: result.icon.replace("square-200", "square-250").replace("http:", "https:"), artist: { name: result.artist } @@ -89,7 +89,7 @@ module.exports.parseUrl = function(url) { name: result.name, streamUrl: result.shortUrl, purchaseUrl: null, - artwork: result.icon.replace("http:", "").replace("square-200", "square-250"), + artwork: result.icon.replace("square-200", "square-250").replace("http:", "https:"), artist: { name: result.artist } @@ -155,7 +155,7 @@ module.exports.search = function(data) { name: result.name, streamUrl: result.shortUrl, purchaseUrl: null, - artwork: result.icon.replace("http:", "").replace("square-200", "square-250"), + artwork: result.icon.replace("square-200", "square-250").replace("http:", "https:"), artist: { name: result.artist } diff --git a/lib/services/spotify.js b/lib/services/spotify.js index c995e37..c4793de 100644 --- a/lib/services/spotify.js +++ b/lib/services/spotify.js @@ -30,7 +30,7 @@ module.exports.lookupId = function(id, type) { name: data.name, streamUrl: "https://play.spotify.com/" + type + "/" + data.id, purchaseUrl: null, - artwork: data.images ? data.images[1].url.replace("http:", "") : data.album.images[1].url.replace("http:", ""), + artwork: data.images ? data.images[1].url.replace("http:", "https:") : data.album.images[1].url.replace("http:", "https:"), artist: { name: artist.name } @@ -43,7 +43,7 @@ module.exports.lookupId = function(id, type) { name: data.name, streamUrl: "https://play.spotify.com/" + type + "/" + data.id, purchaseUrl: null, - artwork: data.images ? data.images[1].url.replace("http:", "") : data.album.images[1].url.replace("http:", ""), + artwork: data.images ? data.images[1].url.replace("http:", "https:") : data.album.images[1].url.replace("http:", "https:"), artist: { name: artist.name },