Intermediary broker between ListenBrainz/MusicBrainz and Discord RPC
Go to file
Thord Johansson 708f227708 Minor cleanup, made the worker thread readonly 2024-06-02 17:45:16 +02:00
.gitignore Initial commit 2024-06-02 17:42:01 +02:00
Program.cs Minor cleanup, made the worker thread readonly 2024-06-02 17:45:16 +02:00
README.md Initial commit 2024-06-02 17:42:01 +02:00
config.ini.example Initial commit 2024-06-02 17:42:01 +02:00
lbz-rpc.csproj Initial commit 2024-06-02 17:42:01 +02:00
lbz-rpc.sln Initial commit 2024-06-02 17:42:01 +02:00

ListenBrainz-DiscordRPC Broker

This is a simple broker that watches a ListenBrainz now-playing status and sends it to Discord RPC.

Usage as standalone application

NOTE: This project has not been tested on Linux but should work with minimal changes. The Windows service functionality will not work on Linux.

The project can be run directly by simply running dotnet run in the project directory. This will start the broker and begin sending now-playing status to Discord RPC. You can also start the executable directly from the binary output directory; note that a valid configuration file must be present in the same directory as the executable.

Installation as a Windows Service

Alternatively, this project uses Topshelf to install as a Windows service. To install it, run the following command (as administrator):

lbz-rpc.exe install

To uninstall the service, run the following command:

lbz-rpc.exe uninstall

While installed you can manage the service using Services (services.msc) or the Topshelf command line (lbz-rpc.exe start, lbz-rpc.exe stop, lbz-rpc.exe restart).

Configuration

In a file called config.ini, provide the necessary details:

[general]
discord_token = ###
listenbrainz_username = your_username_here
poll_interval = 10
ignored_sources = jellyfin

Explanation of the fields:

  • discord_token: The token of your Discord application. You can create a new application and get the token from the Discord Developer Portal.
  • listenbrainz_username: Your ListenBrainz username.
  • poll_interval: The interval in seconds at which the broker will poll ListenBrainz for now-playing status.
  • ignored_sources: A comma-separated list of sources to ignore. This is useful if you want to ignore certain sources from being sent to Discord RPC (such as if you're already using jellyfin-rpc and want this to catch everything else).

Scrobbling

An account on ListenBrainz will be required to use this broker.

This broker does not scrobble tracks to ListenBrainz. If you want to scrobble tracks, here are some suggestions: