Skip to content
Henry Morin edited this page Oct 28, 2024 · 3 revisions

Remember to read the installation instructions first if you haven't

Config file location

Default config path depends on OS

Windows: %appdata%\jellyfin-rpc\main.json

Linux/macOS: ~/.config/jellyfin-rpc/main.json

Config file can also be specified with --config or -c

Showing the config file

A fully filled out config would look something like this

{
    "jellyfin": {
        "url": "https://example.com",
        "api_key": "sadasodsapasdskd",
        "username": ["my_first_user", "my_second_user"],
        "music": {
            "display": ["year", "album", "genres"],
            "separator": "-"
        },
        "blacklist": {
            "media_types": ["music", "movie", "episode", "livetv"],
            "libraries": ["Anime", "Anime Movies"]
        }
    },
    "discord": {
        "application_id": "1053747938519679018",
        "buttons": [
            {
                "name": "dynamic",
                "url": "dynamic"
            },
            {
                "name": "dynamic",
                "url": "dynamic"
            }
        ]
    },
    "imgur": {
        "client_id": "asdjdjdg394209fdjs093"
    },
    "images": {
        "enable_images": true,
        "imgur_images": true
    }
}

but all of that isn't needed to make the code work, for that you'd only need this.

{
    "jellyfin": {
        "url": "https://example.com",
        "api_key": "sadasodsapasdskd",
        "username": "your_username_here"
    }
}

Not that much right? That's because there are defaults for most of these options, with this barebones config you wouldn't get any images but apart from that it's fully functional.

Instructions

Now then, lets continue on with the setup

Jellyfin server URL

The first thing you need is the url to your server, it will look something like one of these

  • http://192.168.1.2:8096
  • http://[2001:4647:aa09:0:b62e:99ff:fe15:984d]:8096
  • https://jf.radical.fun
NOTE: The http/https part is important, without it the script will crash

URL shown in browser with red arrow pointed at it

Jellyfin API key

The next thing you'll need is an API key, you can get one at http(s)://your_jellyfin_url/web/#!/apikeys.html

  1. Click the plus here

API Key page with arrow pointed to plus button

  1. Choose a name

Picture of API Key creation UI

  1. Copy the key

Arrow pointed at newly created API key

Jellyfin username

You also need your username, this is the one you use to log in Username entered into login screen of Jellyfin

OPTIONAL

Discord Application ID

You can make a discord application by going here.

  1. Click "New Application"

Arrow pointing to "New Application" button

  1. then click "Create"

Creation screen

  1. then click "Copy" on the Application ID

Red box around newly created application id

Imgur API

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

"images": {
    "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