Roon Extension: Discord Presence

Display what you’re currently listening to on Discord!

This extension allows you to display your currently listening song on your Discord Presence. It can also display album cover by searching through the Discogs database or uploading it to an anonymous Imgur album.

Current Features
Discogs Integration
You can use the Discogs API to search for album arts that can be embedded on the discord presence.

Imgur Integration
Alternatively, you can also use the Imgur API to upload album art to an anonymous album which will then be used to display album art on the discord presence.

Download and Guide

As this is the first Roon extension I’ve made, suggestions are appreciated!

1 Like

Hi @jtPox and welcome to the forum.

I am the programmer of rooExtend that bundles multiple Roon extensions. What exactly is the Use Case Oyou are interested in?
Album art is normally automatically delivered by Roon after identifying an album.
I like to understand which scenarios your proposal shall cover in detail.

Best DrCWO

The plugin is to allow Roon users who are using the chatting app Discord to display the song that they are currently listening to on their user activity status. Much like the native Spotify integration on Discord that displays “Listening to Spotify” and the song details whenever a user is listening on the streaming platform.

For the album art, yes Roon does delivery the image. However, it cannot be displayed onto the image element on the activity status until it has been put somewhere that everyone else can see (e.g. uploading it onto an image hosting service and retrieving the image URL).
I have tried turning the image buffer into base64 encoding and trying to display it that way. Unfortunately, there is a character limit on the image field itself so that option is canned.

The downside of this plugin that I forgot to add to the original post - this script has to be ran on the same device that the Discord app is running. Because it uses Discord RPC that directly communicates with the chat app itself to update the user status.

I haven’t tried it - but the roon image api lets you specify a size.

So you could try a thumbnail size - and see if you can upload a smaller image.

From what I can tell, you can’t actually upload the image to Discord itself through the RPC. That’s why I had the Discogs and Imgur integration for the album covers.

1 Like

You will need to have NodeJS installed for it to work.

Then, in your terminal, cd to Desktop (or any other folder you want this to be in). Run these commands:

> git clone
> cd discord-presence-roon
> npm install
> node .

This will start the extension, which will then show up on Roon’s extension page.
After that, enable the extension and make sure to change the settings for the extension to meet your needs!

Hope this helps.

1.2 Update
On this update, there are some performance improvements and you won’t have to clone the repository and run it locally anymore! You can simply use the “npx” command with NodeJS.

npx jtpox/discord-presence-roon

Just do note that if you’re running the extension for the first time, a config.json will be generated by Roon on the current working directory on your terminal after you enable it.

To use the same settings as the previous time, just make sure to set the current working directory that config.json is in before running the command.

I have sent a pull request on your project to fix some error. Hope you can give it a review. Thanks!

1 Like

Im not as technically knowledgeable as you are, but i have the script running and discord isnt picking up what is currently being played. Any tips or ideas would be much appreciated!

No problem. Here are a few pointers for you to try to troubleshoot.

  1. Are you running the script and Discord in the same instance?
  2. Did you add the name of the Roon Zone to the “Zones to Monitor” in the extension settings?

I have both discord and the script running at the same time, for clarity’s sake what do you mean by the same instance? Also what roon zone specifically should i add, not sure if its included or not, sorry if i sound inept :sweat_smile:

Discord and the script has to be running on the same desktop.

For Roon Zones, here are some screenshots to get you started.

You need the zone name from here.

And append its name into this field in the extension settings.

1 Like

Got it all working! Thank you so much for the help!! When using this some of the songs dont show the album cover in discord, i have my discogs account linked, would imgur help?

Discogs search is less reliable as files may have wrong or incomplete metadata. Imgur would be a better pick then.

Tried it and it’s quite broken. I have created GitHub issue but here’s the list:

  • It can’t display seek time properly when song’s in loop or when you change seek time manually. (Stuck at 0 or displays wrong time)
  • It only displays playing song when you change the now playing song after you launch this program.

I’d recommend using GitHub - williamtdr/roon-discord-publish: Uses the Discord Presence API to show what you're listening to on Roon. until it’s fixed, it lacks album art cover but works properly at least.

It’s fixed now!

1 Like

Thank you for pointing out issues. And glad that we got to work together to fix them. :smiley:

1 Like

how can i change it to say listening to roon, instead of playing roon?

You can’t, Discord does not allow apps to do that anymore.

ah okay, ive also noticed if i stop playback on my device, the extension still shows as playing in discord, even if i close roon

It takes awhile for Discord to update the status. Does it disappear after awhile?