harmony icon indicating copy to clipboard operation
harmony copied to clipboard

Deezer playback uses YouTube instead of Deezer

Open TheSHEEEP opened this issue 7 years ago • 9 comments

When trying to play a Deezer song (logged in correctly), instead Harmony seems to do a YouTube search and play the first video that comes up. Kinda funny, but not exactly the reason I got the software ;)

image

See the image. The video is the first one coming in up in YouTube when you search for "billy the fridge 80s baby", hence my theory.

I tried disabling the YouTube plugin, but that didn't help.

TheSHEEEP avatar Feb 03 '18 09:02 TheSHEEEP

Hi!

As explained in the faq, Harmony currently pulls the audio from YouTube for Spotify and Deezer, as they do not provide a way to do so through their API. So this is unfortunately not a bug.

What you can do however, is disable the video by activating the "Use the old, less power hungry, playing mechanism" in Youtube's plugin options

vincelwt avatar Feb 03 '18 10:02 vincelwt

Not through public API, maybe. However, in contrast to Spotify, they offer a maintained SDK to enable streaming: https://developers.deezer.com/sdk/native

In C++ (and JavaScript as well, though I haven't checked that out yet). You already have the logging in part covered, so adding that should be absolutely possible.

TheSHEEEP avatar Feb 03 '18 11:02 TheSHEEEP

Wow nice I didn't know their native SDK offered direct streaming.

I have 0 experience with C++, it'd be quite complicated for me to write bindings. Could you send the link of the JS implementation you saw?

Spotify also had a native sdk (libspotify) but it's deprecated and not compatible with Oauth.

vincelwt avatar Feb 04 '18 12:02 vincelwt

The link to the JS SDK is on the same site: https://developers.deezer.com/sdk/javascript

For Spotify, there is librespot by now: https://github.com/librespot-org/librespot Which is written in Rust (never even heard of that before, but whatever as long as it results in a binary...).

TheSHEEEP avatar Feb 04 '18 12:02 TheSHEEEP

Thanks!

It would require a few changes to Harmony's plugin system, as it currently only allow to play tracks through the native JS player or Youtube and the SDK requires to play through their own player implementation. It also requires flash 😖 which would require a few changes to the core app

But that could be done! This is quite a major feature to implement so I'll try this after some important bug fixes

vincelwt avatar Feb 04 '18 14:02 vincelwt

Flash? Are you sure? I know that the Deezer browser player used to require Flash until a year ago or two, but not anymore. But maybe the JS SDK was not updated with it...

TheSHEEEP avatar Feb 04 '18 16:02 TheSHEEEP

From the bottom of https://developers.deezer.com/sdk/javascript/loadtracks:

image

vincelwt avatar Feb 04 '18 16:02 vincelwt

Oof. 😆 Well, your choice, of course. As long as it requires no Flash installation for users ;) But the change to support playback of tracks through anything (either the native player OR whatever the plugin wants to do) sounds like a good idea anyway. Would open things up for external plugins, too (like Spotify via librespot).

TheSHEEEP avatar Feb 04 '18 17:02 TheSHEEEP

Yup you're totally right! It would be very nice to have custom players with plugins. I only need to figure out how to do that with the current app's architecture

vincelwt avatar Feb 04 '18 17:02 vincelwt