Skip to content

A bridge that allows you to set your Jellyfin activity without having to run the discord client

License

Notifications You must be signed in to change notification settings

prochy-exe/jellyfin-rpc-discord-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jellyfin-rpc-discord-bridge

A bridge that allows you to set your Jellyfin activity without having to run the discord client

What is it used for?

It allows you to change your RPC without needing to run the Discord client. It's especially handy when it comes to jellyfin servers, if you wanna show off what you are watching, you can simply install this script as a service (automatic generation coming soon™) so you can just enjoy the shows you love, while having your RPC automatically updated!

How does it work?

It uses arRPC [https://github.com/OpenAsar/arrpc] and jellyfin-rpc [https://github.com/Radiicall/jellyfin-rpc] (all credits go to their respective authors). Jellyfin-RPC communicates with jellyfin to pull the current watching session, and then process it to a dict, that is send over to arRPC which is then used to send it to the Discord client. Well what if you don't want an electon app hogging your system? Simple, try to make sense of how Discord does things behind closed doors.
The discord app is actively sending data over a websocket, that's connected to Discord's gateway. This is what this script emulates (at least the RPC portion of it). This script runs everything for you so no need to worry about running the Node.js arRPC server or jellyfin-rpc manually (keep in mind, you have to have jellyfin-rpc configured)

How do I use it?

You need python. If you have it, all you have to do is clone the repo anywhere you like, chmod +x for both .py files and run the config_generator. This script will walk you through the setup process, and if you don't have jellyfin-rpc already installed, it will do it for you. However, keep in mind if anything goes wrong, please open a new issue, I did try to test the generator to the best of my abilities, but you never know what issue might crop up.

Are there any benefits in using this, apart from convienience?

Believe it or not, having direct connection to Discord's gateway allows you to change the way the RPC shows up on your profile. That means that, unlike using jellyfin-rpc as intended, you can finally be 'Watching' Jellyfin (or directly the show!). Buttons work in both cases, and so do the images (that was one of the hardest parts to crack)

Limitations

Despite having obvious benefits there's a massive limitation that currently won't be fixed and that is the conflict with the locally running Discord app. I could add a way to dynamically tell what path the IPC is listening at and what port the websocket is hosted at by arRPC, however that won't help because jellyfin-rpc doesn't have support for manually changing these variables. The easiest fix is to simply run this script before running Discord, however RPC implementations might get hindered by this so your mileage may vary.

About

A bridge that allows you to set your Jellyfin activity without having to run the discord client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages