-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: changes in Spotify embeds #96
Conversation
Good job Eithoo, only I do not get the album name of the track when using getDetails. |
@fmsidoe I don't think new embeds return information about the track's album JSON data grabbed from embed's code (Song: Hotel Lobby - Pop Smoke){
"data": {
"entity": {
"type": "track",
"name": "Hotel Lobby",
"uri": "spotify:track:5xKXcU8tpSYz7C7wrMMYec",
"id": "5xKXcU8tpSYz7C7wrMMYec",
"title": "Hotel Lobby",
"artists": [
{
"name": "Pop Smoke",
"uri": "spotify:artist:0eDvMgVFoNV3TpwtrVCoTj"
}
],
"coverArt": {
"extractedColors": {
"colorDark": {
"hex": "#535353"
},
"colorLight": {
"hex": "#7F7F7F"
}
},
"sources": [
{
"url": "https://i.scdn.co/image/ab67616d0000b27346e1307c35579c3483ea7b03",
"width": 640,
"height": 640
},
{
"url": "https://i.scdn.co/image/ab67616d00001e0246e1307c35579c3483ea7b03",
"width": 300,
"height": 300
},
{
"url": "https://i.scdn.co/image/ab67616d0000485146e1307c35579c3483ea7b03",
"width": 64,
"height": 64
}
]
},
"releaseDate": {
"isoString": "2020-07-20T00:00:00Z"
},
"duration": 151011,
"maxDuration": 151011,
"isPlayable": true,
"isExplicit": true,
"audioPreview": {
"url": "https://p.scdn.co/mp3-preview/9eefa150fc29b0dca744c567e5fdcada154fd553",
"fileId": "9eefa150fc29b0dca744c567e5fdcada154fd553",
"externallyHosted": false,
"format": "MP3_96"
},
"audio": null,
"hasVideo": false,
"relatedEntityUri": "spotify:artist:0eDvMgVFoNV3TpwtrVCoTj"
},
"embeded_entity_uri": "spotify:track:5xKXcU8tpSYz7C7wrMMYec",
"saved": false,
"passthrough": "NONE",
"backgroundColor": "#535353"
},
"settings": {
"rtl": false,
"session": {
"clientId": "1866a",
"accessToken": "BQAf1_B7K3iBQx3PsrwvfCABGjbTFXr64LXUqsjegtD7ipq3INFR-oF1DiiivGhaIbO4G9Q_39nBCuMa1-g_GTXyZQJ6ykfxHXo0X0kvdAawIKBMlsA",
"accessTokenExpirationTimestampMs": 1662044954810,
"isAnonymous": true
},
"clientId": "dad378e085084decb8b91b987321866a",
"entityContext": "track",
"features": {
"enableShows": true,
"isTracingEnabled": false,
"upgradeButton": "control",
"useEnhancedChromeOSPWACallout": true,
"mwp": false,
"isMWPErrorCodeEnabled": false,
"isMWPQualarooEnabled": false,
"isMwpRadioEntity": true,
"isMWPAndPlaybackCapable": false,
"preauthRecaptcha": false,
"isEqualizerABEnabled": false,
"isRichAlbumPagesEnabledViaServerOverride": false,
"isPodcastEnabled": true,
"isPodcastSeoEnabled": false,
"enableI18nLocales": false,
"enableLanguageSelection": false,
"isAudiobooksOnMWPEnabled": false,
"isNewNPVEnabled": false,
"isSearchChipsEnabled": false,
"isPathfinderBrowseCardsEnabled": false,
"upgradeOverApp": false,
"upgradeOverSignupBanner": false,
"upgradeOverSignupBannerTwo": false,
"musicClips": "0"
},
"isMobile": false,
"isTablet": false,
"isIOS": false,
"isSafari": false,
"isVideoEmbed": false
},
"machineState": {
"initialized": false,
"showOverflowMenu": false,
"showUpsell": false,
"playbackMode": "unknown"
},
"playback": null
} |
The embeds never showed album information, but spotify-url-info did showed album information when you use getTracks function. I was able to retrieve the album.name and album.release_date. Now it does not return any album fields |
also removed hydrateScript since there is not any test using it
Thanks for this great PR, some slightly changes:
How it looks to you? 🙂 |
I wanted to edit things while keeping original code style (not refactoring), that's why filter was used. Nevertheless, your changes are great, LGTM 🙂 |
This comment was marked as off-topic.
This comment was marked as off-topic.
ca308b7
to
c1b2b2c
Compare
c1b2b2c
to
57908c8
Compare
too bad i cannot retrieve the album name from a track like it did before this issue. This fix does not help me unfortunately. spotify-url-info was very easy as I did not have to create code myself to retrieve info from the Spotify API. Now I need to search for another solution or create my own. |
@fmsidoe the problem with the album name is it isn't available in the web version: You can just show it if you use the Spotify app. If you find a way, please share with us 🙏 |
(Closes #94)