discord-rich-presence-plex/README.md
2022-05-11 06:40:28 +05:30

2.7 KiB

Discord Rich Presence for Plex

A Python script that displays your Plex status on Discord using Rich Presence.

Current Version: 2.0.3

Getting Started

  1. Install Python 3.10
  2. Download this repository's contents
  3. Extract the folder contained in the above ZIP file
  4. Navigate a command-line interface (cmd.exe, PowerShell, bash, etc.) into the above-extracted directory
  5. Install the required Python modules by running python -m pip install -r requirements.txt
  6. Start the script by running python main.py

When the script runs for the first time, a config.json file will be created in the working directory and you will be prompted to complete the authentication flow to allow the script to retrieve an access token for your Plex account.

The script must be running on the same machine as your Discord client.

Configuration - config.json

Reference

  • logging
    • debug (default: true) - Outputs additional debug-helpful information to the console if enabled.
  • display
    • useRemainingTime (default: false) - Displays your media's remaining time instead of elapsed time in your Rich Presence if enabled.
  • users (list)
    • token - An access token associated with your Plex account. (X-Plex-Token, Authenticating with Plex)
    • servers (list)
      • name - Name of the Plex Media Server you wish to connect to.
      • blacklistedLibraries (optional list) - Alerts originating from libraries in this list are ignored.
      • whitelistedLibraries (optional list) - If set, alerts originating from libraries that are not in this list are ignored.

Example

{
  "logging": {
    "debug": true
  },
  "display": {
    "useRemainingTime": false
  },
  "users": [
    {
      "token": "HPbrz2NhfLRjU888Rrdt",
      "servers": [
        {
          "name": "Bob's Home Media Server"
        },
        {
          "name": "A Friend's Server",
          "whitelistedLibraries": ["Movies"]
        }
      ]
    }
  ]
}

License

This project is licensed under the MIT License. See the LICENSE file for details.

Credits