vincelwt / harmony

:musical_note: Sleek music player for Spotify, SoundCloud, Google Play Music and your local files
http://getharmony.xyz
859 stars 58 forks source link

Spotify playback uses Youtube instead of Spotify #203

Closed fhaglund closed 6 years ago

fhaglund commented 6 years ago

Exactly the same behavior as seen in https://github.com/vincelwt/harmony/issues/201 – but with Spotify.

fiso commented 6 years ago

Eh. This was me submitting, signed into the wrong account.

vincelwt commented 6 years ago

This is the normal behavior of Harmony. I don't know of any way to change this for Spotify at the moment. To play tracks directly from Spotify, librespot is still very much in beta and hard to implement, and there is no official way to do so.

holms commented 6 years ago

There's absolutely no way to stream from Spotify, API doesn't provide such functionality. This hybrid approach is actually quite creative solution :grinning: The only annoying thing is that sometimes it plays tracks that has absolutely different name, so I can't even imagine how can something be picked from search which has 0% of similarity with spotify track name :)

vincelwt commented 6 years ago

Hey @holms, that may happen if the track is not on YouTube or not the first result of the the query, as Harmony does a simple search and plays the first result.

holms commented 6 years ago

@vincelwt any plans to handle this somehow? If it's not there - skip a song :)?

vincelwt commented 6 years ago

@holms I guess it could be done by checking the names' similarities, although this isn't 100% precise

holms commented 6 years ago

There are plenty of packages which can do this :) https://glench.github.io/fuzzyset.js/

vincelwt commented 6 years ago

@holms or via a simple Levenshtein distance function ;)