vjeranc / cmus-status-scrobbler

Standalone scrobbler program, not a continuously running process, written in Python 3 that works together with cmus. Allows offline mode, scrobbling multiple servers simultaneously, sending a now playing request and handles pause status well.
GNU General Public License v3.0
17 stars 1 forks source link

Interest in Discord rich presence integration? #9

Closed Shellcat-Zero closed 6 months ago

Shellcat-Zero commented 1 year ago

Very happy user here, just wondering if there was any interest in integrating with Discord, like Spotify currently does. Along these lines I've found other solutions for Discord integration, which I have yet to test:

https://github.com/saibakho/cmrpc https://github.com/coletonodonnell/cmus-discord and some others: https://github.com/search?q=discord+cmus+language%3APython&type=repositories&l=Python&s=updated&o=desc

Shellcat-Zero commented 1 year ago

The best proof of concepts I've seen are actually these:

https://github.com/FawkesOficial/cmus-discord-rpc/blob/master/cmus-discord-rpc.py https://github.com/malloc0x3cc/cmus-discord-rp/blob/master/cmusdrp.py

The only catch is that it seems pypresence requires a Discord app client to work, so users cannot just use a web client, which is by design on the part of Discord for the rich presence feature. I'd love to connect it over ssh, due to having multiple headless audio servers with cmus, so I'm trying to figure that out.

vjeranc commented 1 year ago

Yes, looking at the projects, you could go around the dependency of pypresence. It's merely a file write/read. But, as you said, it requires a local running Discord client.

For cmus_status_scrobbler.py I wanted to get the cmus audio status and make sure everything is scrobbled even if device goes offline.

It looks like you want a "now playing" or "latest scrobble" status shown in Discord (with probably some goodies like an album/artist image etc.).

Not sure how Spotify is integrated with Discord, but I guess it is not by local use of Discord SDK (as pypresence does it). Similar integration could be written for Listenbrainz, I guess, if Spotify isn't a special thing for Discord.

If you go the script way, then you can just have a separate script. No reason to modify cmus_status_scrobbler.py to get what you want. Use a status_display_program.sh that invokes all the scripts you want.