Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Fix Spotify integration script #258

Merged
merged 2 commits into from
Jul 6, 2018
Merged

Conversation

b0o
Copy link
Contributor

@b0o b0o commented Jul 5, 2018

The Spotify integration script had several errors preventing successful
extraction of metadata:

  • getArtist() and getSongTitle() were attempting to use the non-existent .text DOM Node property. Fixed to use .innerText
  • getArtUrl() was using an outdated css selector to access the album art div
  • isFavorite() was using a regex to check the heart icon element for an *added* class to determine if the song is a favorite, but Spotify has since changed their class names to *active* for favorited songs.
  • isFavorite() was failing with an error if getButtons().addRemoveToMusic was null, which can be the case shortly after page load. Added a check for this.

b0o added 2 commits July 5, 2018 12:24
The Spotify integration script had several errors preventing successful
extraction of metadata:

-	getArtist() and getSongTitle() were attempting to use the non-existent
	.text DOM Node property. Fixed to use .innerText
- getArtUrl() was using an outdated css selector to access the album art
	div
- isFavorite() was failing with an error if
	getButtons().addRemoveToMusic was null, which can be the case shortly
	after page load. Added a check for this.
@ColinDuquesnoy ColinDuquesnoy added this to the 3.4.0 milestone Jul 6, 2018
@ColinDuquesnoy ColinDuquesnoy merged commit b425593 into ColinDuquesnoy:develop Jul 6, 2018
@ColinDuquesnoy
Copy link
Owner

That looks good 👍 Thank you very much!

@cpjeanpaul cpjeanpaul mentioned this pull request Jul 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants