Eavesdrop.FM: Sync Plex Music listens to ListenBrainz

Hi all!

I’ve been working on a tool called Eavesdrop.FM to submit your Plex Music listens to ListenBrainz, the open source, community-driven Last.fm alternative, via Plex webhooks.

I’m excited to announce an early version of it that I’d love some help testing. I’ve been using it myself, as you can see here. It should be pretty straightforward to use, just follow the step-by-step instructions!

If you have any feedback or find any issues, please let me know, either in this thread, or via Github.

Thank you in advance for any and all feedback :slight_smile:

10 Likes

awesome!!!

1 Like

Just updated Eavesdrop.FM with a smoother onboarding process, clearer documentation, and a new FAQ section.

2 Likes

I was just wondering where the support for ListenBrainz was… I found this thread asking for support to be added, but it is over two years ago and doesn’t look like anyone at Plex took notice.

I can tell you that your site works for me and your site’s step by step instructions make it very easy to setup. I will say that I’m okay with the webhook approach right now, but am not thrilled that I’m basically sending all my music listens through a third party to get to MusicBrainz. I’d much prefer if this was built directly into Plex Server. I don’t know, maybe it could be done as a plugin until Plex figures out that this is something wanted?

Hi @sovamind,

Thanks for your interest in this. ListenBrainz support has been discussed internally with the Plex team, and isn’t something they’re able to implement at this time.

I understand using webhooks isn’t the perfect solution, but for what it’s worth, the source code of the site is available at GitHub for anyone interested in reviewing what’s happening behind the scenes, and I’ve run it past the MetaBrainz team for their approval as well.

With regards to plugins, that was my first thought also, however plugins aren’t well supported by Plex any more, so I wanted to do this as close to “the proper way” as possible.

Just a side note, @TeknoJunky from that thread you linked to is a user of this solution too!

Anyway, let me know if you have any other questions or issues!

1 Like

Definitely can recommend, been using it even before it’s public release!

1 Like

Testing it now, running it through the paces with different Plex clients, local library, Tidal, etc… I’ll open a bug on github if I find anything, but so far no issues. Excellent job on the web page and extremely simple and quick activation procedure. Really great that you took the initiative and time to do this and share with the community. Much appreciative! That said, to echo @sovamind, I really don’t get why this fairly simple thing is apparently such a heavy lift for the Plex folks. ¯\(ツ)

2 Likes

Thanks so much for the feedback! I really appreciate it.

Regarding official support, I can’t speak for Plex, but I’m sure they have their reasons. Thanks again though!

Hi all,

I’ve updated eavesdrop.fm today. This is a big 'un.

At this point I consider it “production-ready” (whatever that means). I guess you can call it the 1.0 release. Semver is codswallop anyway. Here are some release notes, for those interested:

  • Can you smell that new car smell? Brand new, shiny and fresh code, ready and waiting for your music webhooks. Brought to you by JavaScript and Svelte. No more PHP :fu:
  • Separated the take-your-webhooks-and-send-them-to-ListenBrainz bits from the website bits. Easier to maintain, better performance etc etc :fast_forward:
  • The webhook listener :ear: is now a CloudFlare Worker #serverless #blessed #yolo
  • Slightly redesigned the website, and moved it to Github Pages for hosting :success_kid:
  • Clarified some of the FAQs, and moved them to the landing page for visibility :eyes:

The net result of the above work? The project is more maintainable and significantly more scalable. With CloudFlare workers, the performance should be consistent whether there’s one concurrent submission, or one million. The previous version would’ve maxed out at ~3000 concurrent users, if I were to guess.

As an added bonus, the new infrastructure will be a lot cheaper to run. At the current traffic levels, it’s costing me nothing at all!

As usual, let me know how it’s working for you :slight_smile:

3 Likes

I didn’t realize you were the developer! :laughing:

Anyway, thank you! It works great!

2 Likes

Thanks for the kind words, I’m glad you like it!

2 Likes

Important update

I just resolved a security issue with Eavesdrop.FM that under certain scenarios could have resulted in your ListenBrainz token being unintentionally disclosed.

If you created your webhook before today (2020-09-26), you’ll need to go through the Eavesdrop.FM onboarding process once more, and replace your existing Plex webhook. Additionally, in some circumstances, you may need to reset your ListenBrainz token.


Issue Details

By default, Plex Media Server stores all webhook events in logs, including the full URL and query string. If you shared your Plex logs here in the forums, or elsewhere, your ListenBrainz token would have been included in those logs unobscured.

To resolve this issue moving forward, we’re changing the ListenBrainz token parameter from id to token. Plex automatically obfuscates strings following the word token in log output.


Resolution

If you think your token was previously exposed, the steps to resolve this issue are as follows:

  1. Go to listenbrainz.org/profile and click Reset Token
  2. Go to eavesdrop.fm and follow the steps to set up your new webhook, making sure to remove or replace the existing one

If you’re confident your token was not exposed (you didn’t share your logs with anyone), you can skip step 1 and go straight to reconfiguring your webhook.

I’ll provide a 30 day grace period where both URL types continue to function. After 2020-10-26, older URLs with the id parameter will no longer be accepted, and ListenBrainz will not receive your listens.


I apologise sincerely for any inconvenience. Please reach out to me if you have any questions or concerns. Additional information can be found at the link below.

4 Likes

Thanks for staying on top of it! Luckily the process is so simple to re-setup, no inconvenience :slight_smile:

2 Likes

This is cool but I haven’t gotten it to work yet. Have the webhook created and added. Listen brainz is recording listens from spotify for me but not Plex. Not sure where to start…

Huh, that’s odd. Have you double checked the Plex username and ListenBrainz token in the webhook URL are correct? And in your PMS network settings, (Settings -> Network), is the webhooks checkbox at the very bottom enabled?

I’m dumb…I had my username typed wrong in the URL. Works great now!

1 Like

Fantastic! Glad to hear it’s working for you :slightly_smiling_face:

I’m going to report this here, as it only appears to be happening when scrobbling to ListenBrainz and not Last.fm.

Most of the time, I’m getting duplicate scrobbles when TIDAL content that has been added to my library is played.

When I add TIDAL content to my library, the metadata is matched to what MusicBrainz uses and I’ll often tweak it further. So, in the example above, you can see the song gets scobbled using local metadata information and then again with how it’s named in TIDAL.

This is via Plexamp as the there’s still an issue with TIDAL plays not getting added to play history or scrobbling.

EDIT: Actually, while only Last.fm is only making 1 scrobble, it appears it’s using the TIDAL info, so there is something else going on here… I’ll report this elsewhere as well.

Very strange! I’m afk for a few days, but will take a look into it once I’m back.

1 Like

Don’t know if its possible but I do wish it only submitted listening data from specific libraries. This is because I have a audiobook library that I had to create as a music library (as plex does not have audiobook libraries) and would rather not submit listening data for audiobooks.

2 Likes