- Go 64.7%
- Nix 17.8%
- JavaScript 10.1%
- CSS 5.4%
- HTML 2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
If refreshing fails, e.g. in the case of an HTTP timeout, it should not kill the entire program. |
||
| cmd/muffled | ||
| internal | ||
| .air.toml | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| module.nix | ||
| package.nix | ||
| README.md | ||
| screenshot.png | ||
| treefmt.toml | ||
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:
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.
