Skip to content

MPRISsence is a lightweight Discord Rich Presence client for Linux that shows real-time track info, album art, and playback status from Elisa Music Player (probably more audio players coming in future)

License

Notifications You must be signed in to change notification settings

hyperboxed/mprissence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

███╗   ███╗██████╗ ██████╗ ██╗██████╗
████╗ ████║██╔══██╗██╔══██╗██║██╔════╝
██╔████╔██║██████╔╝██████╔╝██║███████╗
██║╚██╔╝██║██╔═══╝ ██╔══██╗██║╚════██║
██║ ╚═╝ ██║██║     ██║  ██║██║███████║
╚═╝     ╚═╝╚═╝     ╚═╝  ╚═╝╚═╝╚══════╝
            S E N C E

🎵 Elisa Music Player Discord RPC

A lightweight, feature-rich Discord Rich Presence (RPC) client for the Elisa Music Player (for now) on Linux.

Technically, it should work on any MPRIS-compatible player, but it needs to be tested on other players, plus it needs some more customization (like icons for the corresponding players). So, only for Elisa for now.

It also features cover art fetching from iTunes. If the cover isn't found on iTunes, it will be uploaded to Imgur and cached for future use, and then deleted from Imgur when the track is no longer playing!

✨ Automatically updates your Discord status with track title, artist, progress, playback state, and album art.


📚 Table of Contents


Features

Function Status Description
🎵 Rich Metadata Track name, artist, album
🖼 Smart Cover Art iTunes search fallback + local file upload
⏱️ Seek Detection Correct timestamp calculation
💤 Pause/Stop Logic Smart status hiding/switching
🔥 Systemd Integration Background service without interface
📦 Caching Minimizes API requests to save traffic
🛠️ More players support Only Elisa for now

🖼 Preview


🚀 Installation

  1. Clone the repository
git clone https://github.com/hyperboxed/mprissence.git
cd mprissence
  1. Run the installer
chmod +x install.sh
./install.sh

‼️ Note that the "install.sh" script DOES NOT need root privileges!

The script automatically:

  • Checks DBus development headers
  • Creates Python virtual environment
  • Installs Python dependencies
  • Registers a systemd user service

🛠 Management

Check status:

systemctl --user status mprissence

View logs:

journalctl --user -u mprissence -f

Restart:

systemctl --user restart mprissence

Stop:

systemctl --user stop mprissence

🗑 Uninstallation

chmod +x uninstall.sh
./uninstall.sh

🧩 How it Works

🖧 Architecture

flowchart LR
    A[Elisa Player] --> B[MPRIS / DBus]
    B --> C[RPC Daemon]
    C --> D[Discord IPC]
Loading

🔍 Activity Logic

  • Updates every second only when state changes
  • Detects seek events and recalculates timestamps
  • Clears presence when playback stops

⚙ Performance

  • Persistent DBus session
  • Cached artwork + delete-hashes
  • Minimal CPU usage

📦 Requirements

  • Linux OS (Arch, Ubuntu, Fedora, etc.)

  • Python 3

  • DBus/MPRIS

  • Development headers:

    • Debian/Ubuntu: libdbus-1-dev libglib2.0-dev
    • Arch: dbus-glib
    • Fedora: dbus-devel

‼️ By the way, the installation script will automatically install the required dependencies


🤝 Contributing

Any PR's and issues are welcome, especially if you want to add even more features


Made with ❤️ for the Linux community <3
If you like this project, please leave a ⭐ on GitHub!

About

MPRISsence is a lightweight Discord Rich Presence client for Linux that shows real-time track info, album art, and playback status from Elisa Music Player (probably more audio players coming in future)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published