Use SSL urls for all artwork (no more protocol relative)

This commit is contained in:
Jonathan Cremin 2014-12-06 13:28:38 +00:00
parent 65af698a78
commit 90c59078c0
5 changed files with 11 additions and 11 deletions

View file

@ -37,7 +37,7 @@ module.exports.lookupId = function(id) {
name: result.title, name: result.title,
streamUrl: "https://listen.beatsmusic.com/albums/" + result.id, streamUrl: "https://listen.beatsmusic.com/albums/" + result.id,
purchaseUrl: null, purchaseUrl: null,
artwork: artwork.replace("http:", ""), artwork: artwork.replace("http:", "https:"),
artist: { artist: {
name: result.artist_display_name name: result.artist_display_name
} }
@ -56,7 +56,7 @@ module.exports.lookupId = function(id) {
name: result.title, name: result.title,
streamUrl: "https://listen.beatsmusic.com/albums/" + result.refs.album.id + "/tracks/" + result.id, streamUrl: "https://listen.beatsmusic.com/albums/" + result.refs.album.id + "/tracks/" + result.id,
purchaseUrl: null, purchaseUrl: null,
artwork: artwork.replace("http:", ""), artwork: artwork.replace("http:", "https:"),
artist: { artist: {
name: result.artist_display_name name: result.artist_display_name
}, },

View file

@ -34,7 +34,7 @@ module.exports.lookupId = function(id, type, next) {
name: album.name, name: album.name,
streamUrl: "https://play.google.com/music/listen#/album/" + album.albumId, streamUrl: "https://play.google.com/music/listen#/album/" + album.albumId,
purchaseUrl: "https://play.google.com/store/music/album?id=" + 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: { artist: {
name: album.artist name: album.artist
} }
@ -51,7 +51,7 @@ module.exports.lookupId = function(id, type, next) {
name: track.title, name: track.title,
streamUrl: "https://play.google.com/music/listen#/track/" + track.nid + "/" + track.albumId, streamUrl: "https://play.google.com/music/listen#/track/" + track.nid + "/" + track.albumId,
purchaseUrl: "https://play.google.com/store/music/album?id=" + 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: { album: {
name: track.album name: track.album
}, },

View file

@ -33,7 +33,7 @@ module.exports.lookupId = function(id, type) {
name: result.trackName ? result.trackName : result.collectionName, name: result.trackName ? result.trackName : result.collectionName,
streamUrl: null, streamUrl: null,
purchaseUrl: result.collectionViewUrl, 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: { artist: {
name: result.artistName name: result.artistName
} }
@ -93,7 +93,7 @@ module.exports.search = function(data) {
name: result.trackName ? result.trackName : result.collectionName, name: result.trackName ? result.trackName : result.collectionName,
streamUrl: null, streamUrl: null,
purchaseUrl: result.collectionViewUrl, 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: { artist: {
name: result.artistName name: result.artistName
} }

View file

@ -42,7 +42,7 @@ module.exports.lookupId = function(id) {
name: result.name, name: result.name,
streamUrl: result.shortUrl, streamUrl: result.shortUrl,
purchaseUrl: null, purchaseUrl: null,
artwork: result.icon.replace("http:", "").replace("square-200", "square-250"), artwork: result.icon.replace("square-200", "square-250").replace("http:", "https:"),
artist: { artist: {
name: result.artist name: result.artist
} }
@ -89,7 +89,7 @@ module.exports.parseUrl = function(url) {
name: result.name, name: result.name,
streamUrl: result.shortUrl, streamUrl: result.shortUrl,
purchaseUrl: null, purchaseUrl: null,
artwork: result.icon.replace("http:", "").replace("square-200", "square-250"), artwork: result.icon.replace("square-200", "square-250").replace("http:", "https:"),
artist: { artist: {
name: result.artist name: result.artist
} }
@ -155,7 +155,7 @@ module.exports.search = function(data) {
name: result.name, name: result.name,
streamUrl: result.shortUrl, streamUrl: result.shortUrl,
purchaseUrl: null, purchaseUrl: null,
artwork: result.icon.replace("http:", "").replace("square-200", "square-250"), artwork: result.icon.replace("square-200", "square-250").replace("http:", "https:"),
artist: { artist: {
name: result.artist name: result.artist
} }

View file

@ -30,7 +30,7 @@ module.exports.lookupId = function(id, type) {
name: data.name, name: data.name,
streamUrl: "https://play.spotify.com/" + type + "/" + data.id, streamUrl: "https://play.spotify.com/" + type + "/" + data.id,
purchaseUrl: null, 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: { artist: {
name: artist.name name: artist.name
} }
@ -43,7 +43,7 @@ module.exports.lookupId = function(id, type) {
name: data.name, name: data.name,
streamUrl: "https://play.spotify.com/" + type + "/" + data.id, streamUrl: "https://play.spotify.com/" + type + "/" + data.id,
purchaseUrl: null, 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: { artist: {
name: artist.name name: artist.name
}, },