pogmommy / jellyfin-rpc

Displays the content you're currently watching on Discord!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jellyfin-RPC

Frequently Asked Questions

Program used to display what you're currently watching on discord.

Jellyfin-RPC uses the API to check what you're currently watching, this means that the program can be ran from a server or your computer. The only requirement is that discord is open and logged in.

Example Movie:

image

Example Series:

image

Example Music:

image

Example Live TV:

image

Terminal Output:

image

Setup

If you're using Windows then there's an install script that you can download here! (if anyone wants to make something similar for linux then make a PR!)

Make a main.json file with the following items in $XDG_CONFIG_HOME/jellyfin-rpc on Linux/macOS and %APPDATA%\jellyfin-rpc\main.json on Windows.

If you're unsure about the directory then run jellyfin-rpc and it will tell you where to place it.

{
    "Jellyfin": {
        "URL": "https://example.com",
        "API_KEY": "sadasodsapasdskd",
        "USERNAME": "your_username_here",
        "_comment": "the 2 lines below and this line arent needed and should be removed, by default nothing will display if these are present"
        "TYPE_BLACKLIST": ["music", "movie", "episode", "livetv"]
        "LIBRARY_BLACKLIST": ["Anime", "Anime Movies"]
    },
    "Discord": {
        "APPLICATION_ID": "1053747938519679018"
    },
    "Imgur": {
        "CLIENT_ID": "asdjdjdg394209fdjs093"
    },
    "Images": {
        "ENABLE_IMAGES": true,
        "IMGUR_IMAGES": true
    }
}

Jellyfin

URL

This will be the URL to your jellyfin instance, remember to include http/https in the url.

If you want to know more about jellyfin you can check it out here.

API Key

This is the API key used for checking what you're currently watching on Jellyfin.

You can get one by going to <YOUR INSTANCE URL HERE>/web/#!/apikeys.html

Username

This is the username you use to log into Jellyfin.

The username is needed because if you have multiple accounts (friends, family) then the program will just grab the first person it sees in the list.

Discord Application ID

This step is optional as I have included my own.

If this variable is empty it will use the default one

You can make a discord application by going here.

Imgur API

For the imgur api to work you have to do this in the config

"ENABLE_IMAGES": true,
"IMGUR_IMAGES": true
  1. Go to Imgur's application registration page.
  2. Enter any name for the application and pick OAuth2 without a callback URL as the authorisation type.
  3. Submit the form to obtain your application's client ID.

Tutorial stolen from discord-rich-presence-plex

Systemd

For systemd I have included this file, you can download it directly by pressing ctrl+s on the page.

In the service file you have to change the ExecStart= line. You can launch the script without -c if you put the main.json file in the XDG_CONFIG_HOME directory

The service is supposed to run in user mode, put the service file into this directory $HOME/.config/systemd/user/ and use systemctl --user enable --now jellyfin-rpc.service to start and enable it.

Building

You need rust installed, you can get rustup from here

If you already have rustup installed then make sure its the latest 2021 version, you can run rustup update to update to the newest version.

You also need openssl libs on linux (Don't remember exactly which one, running the jellyfin-rpc exec will tell you what you're missing)

Please make an issue with the missing libs in this repo so I can put them here, also say what distro you're running so I can test it.

After doing all of this you should be able to just run cargo build to get a binary. In order to get an optimized binary just add --release to the end of cargo build.

Your binary will be located in target/debug/jellyfin-rpc or target/release/jellyfin-rpc

About

Displays the content you're currently watching on Discord!

License:GNU General Public License v3.0


Languages

Language:Rust 71.4%Language:Shell 15.1%Language:Batchfile 13.5%