An embeddable ListenBrainz widget
  • Go 64.7%
  • Nix 17.8%
  • JavaScript 10.1%
  • CSS 5.4%
  • HTML 2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lukas Wurzinger d275fda5f2
non-fatal refresh errors
If refreshing fails, e.g. in the case of an HTTP timeout, it should not kill the
entire program.
2026-09-01 22:42:47 +02:00
cmd/muffled minimum interval 1 2026-08-30 01:41:49 +02:00
internal non-fatal refresh errors 2026-09-01 22:42:47 +02:00
.air.toml init 2026-08-15 11:52:54 +02:00
.gitignore init 2026-08-15 11:52:54 +02:00
flake.lock init 2026-08-15 11:52:54 +02:00
flake.nix add NixOS module 2026-08-30 01:37:57 +02:00
go.mod update 2026-08-15 16:06:29 +02:00
go.sum update 2026-08-15 16:06:29 +02:00
LICENSE init 2026-08-15 11:52:54 +02:00
module.nix add NixOS module 2026-08-30 01:37:57 +02:00
package.nix update 2026-08-15 16:06:29 +02:00
README.md document usage via Nix 2026-08-30 01:46:24 +02:00
screenshot.png init 2026-08-15 11:52:54 +02:00
treefmt.toml init 2026-08-15 11:52:54 +02:00

Muffled

Muffled is a simple service that gets the music you're listening to from ListenBrainz and exposes the status of what is currently playing via Server Sent Events as well as an <iframe> that you can embed on your website, which looks like this by default:

Screenshot

Note that SSE works best when HTTP/2 or newer is being used.

ListenBrainz itself connects to various services, such as Spotify, Apple Music, Last.FM, or your own Navidrome instance. If you're logged in, see ListenBrainz third-party music services.

Configuration

Example muffled.toml:

user = "your_username"
listen = "localhost:8080"
log_level = "info"
interval = 120 # Don't set this too low if you're using the default instance
listenbrainz_base_url = "https://api.listenbrainz.org/1"
widget_path = "/path/to/widget.html" # If you want to use custom HTML, CSS, and JS

If you want to customize the appearance or behavior, check the assets directory for the default widget implementation.

Usage via Nix

This flake outputs a package via packages.<system>.default and a NixOS module via nixosModules.default. See flake.nix for more details.

NixOS module usage

Here's an example Muffled configuration for NixOS:

{
  services.muffled = {
    enable = true;
    settings = {
      user = "lukaswrz";
      listen = "localhost:8080";
      log_level = "info";
      interval = 120;
      listenbrainz_base_url = "https://api.listenbrainz.org/1";
    };
  };
}

Take a look at the module source for more details.