Skip to content

tarokeitaro/ndcord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ndcord

Simple Discord Rich Presence for Navidrome

Disclaimer

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.

How does it work?

image image

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"

How to start?

Get Discord client_id

Create your new application in Discord Developer Portal, and get client_id.

Clone the Repository

Clone or download the repository.

git clone https://github.com/tarokeitaro/ndcord.git

Virtual Environment (Optional)

If you don't want to disturb your global python environment, you can create a virtual environment.

python -m venv env

Then enter the virtual environment.

Linux/MacOS

source env/bin/activate

Windows Command Prompt

source env\Scripts\activate.bat

Windows PowerShell

source env\Scripts\Activate.ps1

Requirements

This script requires pypresence and requests. Install these libraries via pip.

pip install requests

Currently, this script depends on the latest development version of pypresence.

pip install https://github.com/qwertyquerty/pypresence/archive/master.zip

Edit secret.json

Fill 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"
}

Start ndcord!

Just do this!

python ndcord.py

To stop the script, press Ctrl + C

About

Simple Discord Rich Presence for Navidrome

Resources

License

Stars

Watchers

Forks

Contributors

Languages