Simple Discord Rich Presence for Navidrome
Due to a lack of API support for currently playing songs from Navidrome / Subsonic, ndcord might run into some known issues:
- Wrong now playing timestamp when pausing or repeating a song
- When an ongoing song starts playing again, it does not show the presence UNTIL the next song is played.
ndcord takes JSON data from Navidrome Rest API and then sends it to an app using Discord Developer Portal via pypresence.
It is designed to have a similar Spotify Discord presence look and feel, including:
- Album art from Navidrome itself (public, https-based server) or iTunes Store (http-based server).
- Progress bar (read Disclaimer)
- Artist name as Discord status instead of "Navidrome"
Create your new application in Discord Developer Portal, and get client_id.
Clone or download the repository.
git clone https://github.com/tarokeitaro/ndcord.gitIf you don't want to disturb your global python environment, you can create a virtual environment.
python -m venv envThen enter the virtual environment.
Linux/MacOS
source env/bin/activateWindows Command Prompt
source env\Scripts\activate.batWindows PowerShell
source env\Scripts\Activate.ps1This script requires pypresence and requests. Install these libraries via pip.
pip install requestsCurrently, this script depends on the latest development version of pypresence.
pip install https://github.com/qwertyquerty/pypresence/archive/master.zipFill in the data you have accordingly and this is mandatory!
Important: The "server" field must include / at the end of the URL.
{
"client_id": "xxxxxxxxxxxxxxxxxxx",
"server": "https://your.ndhost.here/",
"username": "john",
"password": "john123"
}Just do this!
python ndcord.pyTo stop the script, press Ctrl + C