deadbeef icon indicating copy to clipboard operation
deadbeef copied to clipboard

ListenBrainz Plugin

Open rdswift opened this issue 6 years ago • 12 comments

Steps to reproduce the problem

This is a new request, not a specific problem.

What's going on? Describe the problem in as much detail as possible.

Please consider adding a plugin for submitting listens to ListenBrainz similar to the last.fm plugin. The api specs can be found at https://listenbrainz.readthedocs.io/en/production/dev/api.html. I would consider trying to write something myself, but it's been close to 30 years since I've done anything serious in C, and I just don't have the time to get back up to speed. Thanks.

Information about the software:

Deadbeef version: 0.7.2 OS: Linux

rdswift avatar Mar 01 '19 18:03 rdswift

Just use proxy https://listenbrainz.org/lastfm-proxy

r3dnck avatar Apr 21 '19 14:04 r3dnck

Just use proxy https://listenbrainz.org/lastfm-proxy

I can submit using both that or http://proxy.listenbrainz.org but in both cases, the submitted information is only partially processed. The information does not show up on the Recent Listens page. I've also noted this on a ticket for the ListenBrainz project.

rdswift avatar Apr 23 '19 00:04 rdswift

This would be a very nice feature to have. Maybe the lastfm scrobbler could be adapted to allow specifying multiple URLs so one can scrobble to both lastfm and ListenBrainz with it?

IvanDSM avatar Sep 07 '20 22:09 IvanDSM

I note that @amCap1712 has developed a plugin (https://usercontent.irccloud-cdn.com/file/6Vg4Ti2c/listenbrainz.so) which can be dropped in ~/.local/lib/deadbeef/ Unfortunately, that doesn't work for me yet. Sometimes it seems to be working (the logs show a success), but it doesn't show up on ListenBrainz website. And sometimes I get the error: "code":400,"error":"Cannot parse JSON document: 'utf-8' codec can't decode byte 0x80 in position 35: invalid start byte"

Whereas, using the last.fm proxy: proxy.listenbrainz.org seems to work fine. But I believe the ListenBrainz listen payload is more descriptive than the Last.fm scrobble payload.

the-solipsist avatar Oct 23 '20 01:10 the-solipsist

I hate necro-bumping, but honestly I don't think starting a new Issue is a good idea here.

This plug-in that @amCap1712 developed works GREAT with Maloja, a self-hosted music scrobbling service. The only problem with the plugin is that it seems to be in a debug mode. Every time a track starts or successfully scrobbles, it pops up with the log.

I'm guessing it's something as simple as a flag in the source code, but I don't understand C. Does anyone know what to change in the code so that I can compile it and have a working plugin for Maloja? Source code here: https://github.com/amCap1712/listenbrainz-ddb/blob/master/plugins/lastfm/listenbrainz.c

cirdanlunae avatar Apr 06 '23 06:04 cirdanlunae

Yeah, seems like the author didn't make the logging configurable.. You need to change this line: .plugin.flags = DDB_PLUGIN_FLAG_LOGGING, to this .plugin.flags = 0,

Oleksiy-Yakovenko avatar Apr 06 '23 08:04 Oleksiy-Yakovenko

Thanks @Oleksiy-Yakovenko !!! I'm going to try to figure out how to compile it... crossing my fingers I can figure it out

cirdanlunae avatar Apr 06 '23 23:04 cirdanlunae

It's my turn to necro-bump this.

The code at https://github.com/amCap1712/listenbrainz-ddb/blob/master/plugins/lastfm/listenbrainz.c is quite broken.

For sure the binary linked to above was not built from that source, it is pointless to try to compile from it.

To give a simple illustration, the listenbrainz_uri_encode function is undefined in the source code yet it's part of the binary:

$ nm /path/to/listenbrainz.so | grep listenbrainz_uri_encode
0000000000001e10 t listenbrainz_uri_encode

And the different Makefile don't even care about presence of the listenbrainz.c file.

In other words, unless the original plugin developer intervenes, this plugin source is a dead end.

The original plugin developer was poked three weeks ago, no answer yet: https://github.com/amCap1712/listenbrainz-ddb/issues/5

waptaff avatar Feb 23 '24 07:02 waptaff

Hi! Sorry for the late response, was super busy. I can try fixing the plugin and submitting it here if it helps.

amCap1712 avatar Feb 23 '24 08:02 amCap1712

Hi! Sorry for the late response, was super busy. I can try fixing the plugin and submitting it here if it helps.

That would be amazing. I long to go back to using DeaDBeeF since it's my favorite music player, but this is unfortunately holding me off from doing the jump back :(

Getting this feature integrated would be a dream come true :)

IvanDSM avatar Mar 21 '24 04:03 IvanDSM