# ListenBrainz-DiscordRPC Broker This is a simple broker that watches a ListenBrainz now-playing status and sends it to Discord RPC. > **NOTE:** An account on ListenBrainz will be required to use this broker. ## Usage as standalone application 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. > **NOTE:** This project has not been tested on Linux but should work with minimal changes. The Windows service functionality will not work on Linux. ## 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: ```ini [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 This broker does not scrobble tracks to ListenBrainz. If you want to scrobble tracks, here are some suggestions: - [Web Scrobbler for Firefox](https://addons.mozilla.org/en-US/firefox/addon/web-scrobbler/) - A browser extension that scrobbles tracks from various sources. Recommend configuring to ignore media that is not categorised as music. - [jellyfin-plugin-listenbrainz](https://github.com/lyarenei/jellyfin-plugin-listenbrainz) - A Jellyfin plugin that scrobbles tracks from Jellyfin to ListenBrainz. For more suggestions, see the [official ListenBrainz website](https://listenbrainz.org/add-data/).