Skip to content

nichtlegacy/PlexRPC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlexRPC for Vencord

A Vencord plugin that displays your Plex Media Server playback status as Discord Rich Presence.

Movie Episode

Inspired by discord-rich-presence-plex by phin05. This plugin brings matching design and functionality directly into Vencord, eliminating the need for external Python scripts or services.

✨ Features

  • 🔐 Seamless OAuth: Sign in with your Plex account directly - no need to manually copy tokens or URLs!
  • 📺 Full Media Support: Dynamic layouts for Movies, TV shows and Music tracks
  • 🎨 Highly Customizable: Toggle duration, genres, year, posters and customize time display
  • 🖼️ Smart Posters: Automatic transparent padding for perfect square display on Discord
  • ⏸️ Pause Detection: Shows "Paused" status instead of a progress bar
  • 🔗 External Links: IMDb and TMDB buttons for movies (automatically generated)
  • 🎯 No External Dependencies: 100% Client-side Vencord plugin
  • 🔒 Privacy First: Tokens stored locally/encrypted, only sent to your official Plex Media Server

🚀 Quick Start

Option 1: Using Vencord Fork

  1. Enable PlexRPC in Vencord Settings -> Plugins.
  2. Click "Sign in to Plex" in the plugin settings.
  3. Authorize the plugin in the browser window that opens.
  4. That's it! The plugin will automatically detect your server, username, and token.

Option 2: Manual Installation (Custom Plugin)

⚠️ For advanced users only. You need to build Vencord from source first.

  1. Navigate to your Vencord src folder and create a userplugins folder if it doesn't exist
  2. Clone this repository into src/userplugins/:
    cd src/userplugins
    git clone https://github.com/nichtlegacy/PlexRPC.git plexRPC
  3. Rebuild Vencord: pnpm build
  4. Restart Discord
  5. Enable PlexRPC in Vencord Settings -> Plugins

For more details, see the Vencord Custom Plugins Guide

⚙️ Configuration

Display Settings 🎨

Customize exactly what you want to show:

  • Show Duration: Displays media runtime (e.g. "2 hr 10 min")
  • Show Genres: Shows genres for movies (e.g. "Action, Adventure")
  • Show Year: Displays release year (e.g. "(2001)")
  • Show Posters: Toggle large cover art display
  • Progress Mode:
    • Progress Bar: Standard Discord time bar (default)
    • Elapsed Time: Shows "05:23 elapsed" text
    • Hidden: No time display

Advanced Settings 🛠️

  • Enabled Media Types: Filter to show only Video (Movies/TV), Music, or All.
  • Buttons Enabled: Toggle IMDb/TMDB buttons for movies.
  • Imgur Client ID: Optional fallback for poster uploads (see below).
  • Manual Configuration: You can still manually enter Server URL and Token if you prefer not to use OAuth.

Poster Upload 🖼️

Discord Rich Presence requires images to be hosted externally. Here's how the plugin handles posters:

  1. Fetch: Downloads the poster from your Plex server
  2. Resize: Scales down to max 512×512px to reduce upload size
  3. Pad: Adds transparent padding to make the image square (Discord displays 1:1)
  4. Upload: Uploads to Litterbox (72h retention, no account needed)
  5. Fallback: If Litterbox fails, tries Imgur (requires Client ID)
  6. Cache: Uploaded URLs are cached for 1 hour to avoid re-uploading

💡 Imgur Client ID: Only needed if Litterbox is unavailable. Get one free at Imgur API.

🎬 Appearance

Movies

Movie Rich Presence

  • Details: Movie Title (Year)
  • State: Runtime · Genres
  • Progress: Time remaining bar
  • Buttons: IMDb, TMDB links

TV Shows

Episode Rich Presence

  • Details: Series Name (Year)
  • State: S01E05 • Episode Title
  • Progress: Time remaining bar

Music

Music Rich Presence

  • Details: Track Title
  • State: Album
  • Large Text: Artist Name
  • Rich Presence Name: "Listening to [Artist]"

Paused State

  • Status: "Paused" appended to state
  • Progress: Bar removed, time display frozen

🔒 Privacy & Security

Your Plex token is safe:

  • Stored locally and encrypted by Vencord
  • Never sent to Discord or any third party
  • Only transmitted to your local/configured Plex server
  • Images are uploaded to Litterbox (72h retention) to serve as assets for Discord (no metadata included)

🛠️ Technical Details

Architecture

  • Frontend (index.tsx): React UI for Settings, OAuth polling, and Rich Presence logic.
  • Native Module (native.ts): Handles OAuth PIN creation, CORS-free requests to Plex, and image processing.
  • Polling: Checks for active sessions every 15 seconds.

Image Processing

Posters are processed using Electron's nativeImage API to add transparent padding, ensuring 2:3 Plex posters fit perfectly into Discord's 1:1 square slot without cropping.

🙏 Credits

📝 License

This plugin is licensed under the GPL-3.0 License.

About

Discord Rich Presence for Plex Media Server - A Vencord plugin that displays your watching activity with posters, progress, and IMDb/TMDB links

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors