Coder Social home page Coder Social logo

roon-discord-publish's Introduction

roon-discord-publish

Uses the Discord Presence API to show what you're listening to on Roon. Edit the settings object in the main .js file to suit your configuration.

Based on an implementation by 615283 (James Conway). Changes:

  • significantly improve use of javascript paradigms / language age
  • allow for use of a particular core instead of using discovery
  • extract settings functionality, as this tends to crash roon
  • don't publish a presence if roon is not being actively used
  • auto shutdown
  • block on Discord connection on startup
  • some rate limiting
  • remove electron dependency, among others

roon-discord-publish's People

Contributors

williamtdr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

roon-discord-publish's Issues

How to use this?

How do you use this? readme states nothing about anything making this entire thing pointless without any explanation about anything. Write what this is meant to be and how to use it, not everyone is a java developer.

Is it possible to show music cover ?

I know the pictures are set in the discord dev app, but I'm still looking for a solution.

Now I found this article, it is about tidal unofficial presence how to do this:
purpl3F0x/TIDAL-Discord-Rich-Presence-UNOFFICIAL#4

and related

One of the commit:
purpl3F0x/TIDAL-Discord-Rich-Presence-UNOFFICIAL@fad92ff

Roon api about image
https://roonlabs.github.io/node-roon-api/RoonApiImage.html

With these information, will it be possible to make this work?

Or ... more advanced, if the picture is local, it may be possible to achieve this with a simple rpc.

a little help to make it work - error

hello ! I'm trying to make it run but i'm kinda noob with node and i dont know how to troubleshoot the error.

I'm gettign the following error when im running it. I have installed node, git all seems good i run the npm install without errors and when i run node .js im getting the following error :

-> REQUEST 0 com.roonlabs.registry:1/info
events.js:377
throw er; // Unhandled 'error' event
^

Error: Unexpected server response: 400
at ClientRequest. (c:\Users\sesho\Desktop\roon-discord-rp-master\node_modules\ws\lib\websocket.js:542:5)
at ClientRequest.emit (events.js:400:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at Socket.socketOnData (_http_client.js:515:22)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:290:12)
at readableAddChunk (internal/streams/readable.js:265:9)
at Socket.Readable.push (internal/streams/readable.js:204:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
Emitted 'error' event on WebSocket instance at:
at abortHandshake (c:\Users\sesho\Desktop\roon-discord-rp-master\node_modules\ws\lib\websocket.js:649:15)
at ClientRequest. (c:\Users\sesho\Desktop\roon-discord-rp-master\node_modules\ws\lib\websocket.js:542:5)
[... lines matching original stack trace ...]
at Socket.Readable.push (internal/streams/readable.js:204:10)

i allowed the firewall entry as well.

the second time i run it im not getting any error but it doesnt seem to work either :

-> REQUEST 0 com.roonlabs.registry:1/info
<- COMPLETE 0 Success {"core_id":"f762cbb2-740f-4a34-a436-ee1384c6b44f","display_name":"roon","display_version":"1.8 (build 814) stable"}
-> REQUEST 1 com.roonlabs.registry:1/register {"extension_id":"com.georlegacy.general.roon-discord-rp","display_name":"Discord Rich Presence","display_version":"1.0","publisher":"615283 (James Conway)","email":"[email protected]","required_services":["com.roonlabs.transport:2"],"optional_services":[],"provided_services":["com.roonlabs.settings:1","com.roonlabs.pairing:1","com.roonlabs.ping:1"],"website":"https://www.615283.net"}
-> REQUEST 0 com.roonlabs.registry:1/info
<- COMPLETE 0 Success {"core_id":"09c6880e-7eed-4596-9cf6-e50c922c6e08","display_name":"HADES","display_version":"1.8 (build 814) stable"}
-> REQUEST 1 com.roonlabs.registry:1/register {"extension_id":"com.georlegacy.general.roon-discord-rp","display_name":"Discord Rich Presence","display_version":"1.0","publisher":"615283 (James Conway)","email":"[email protected]","required_services":["com.roonlabs.transport:2"],"optional_services":[],"provided_services":["com.roonlabs.settings:1","com.roonlabs.pairing:1","com.roonlabs.ping:1"],"website":"https://www.615283.net"}

In the settings object i changed only the ip of the roon core and i need to change also the clientid of discord that i just found it also through the dev portal. The zone id where can i find it ? hmm is it the one inside var/roon/RAATServer/Settings adding a 1601 or do i need to search on the client i want to display music from ? im running a roon server instance in docker.

const settings = {
discord: {
clientId: '464873958232162353',
// const scopes = ['rpc', 'activities.write'];
},
zone: {
zone_id: '1601563aef66097db5cf42339fd8d2051a33'
},
core: {
ip: "192.168.5.20"
},
app: {
auto_shutdown: false,
use_discovery: false
}

thanx in advance for the help !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.