spotify-url-info
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/microlinkhq/spotify-url-info", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"main": "src/index.js", | ||
@@ -8,0 +8,0 @@ "author": { |
@@ -112,3 +112,3 @@ 'use strict' | ||
case TYPE.EPISODE: | ||
return data.sharingInfo.shareUrl | ||
return spotifyURI.formatOpenURL(data.uri) | ||
default: | ||
@@ -128,4 +128,4 @@ return data.external_urls.spotify | ||
track: track.name, | ||
description: data.description || undefined, | ||
artist: getArtistTrack(track), | ||
description: data.description || track.description, | ||
artist: getArtistTrack(track) || track.artist, | ||
image: getImages(data).reduce((a, b) => (a.width > b.width ? a : b)).url, | ||
@@ -162,6 +162,8 @@ audio: track.audio_preview_url || track.preview_url, | ||
case TYPE.EPISODE: { | ||
const { podcast, audioPreview } = data | ||
const { subtitle, audioPreview } = data | ||
const [artist, description] = data.subtitle.split(' - ') | ||
return { | ||
artists: podcast.publisher.name.split(' and ').map(name => ({ name })), | ||
name: podcast.name, | ||
artist, | ||
description, | ||
name: subtitle, | ||
preview_url: audioPreview.url | ||
@@ -168,0 +170,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13210
226