# ListenBrainz

**URL:** <https://meta.discourse.org/t/listenbrainz/254769>\
**Category:** Plugin\
**Created:** [February 10, 2023, 2:32pm UTC](https://meta.discourse.org/t/listenbrainz/254769 "2023-02-10T14:32:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![phw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phw/32/285652_2.png) [@phw](https://meta.discourse.org/u/phw)\
**Post date:** [February 10, 2023, 2:32pm UTC](https://meta.discourse.org/t/listenbrainz/254769/1 "2023-02-10T14:32:20Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Discourse plugin to show a user’s ListenBrainz listenings in their profile |
| 🛠 | **Repository Link** | [https://git.sr.ht/~phw/discourse-listenbrainz](https://git.sr.ht/~phw/discourse-listenbrainz) |
| 📖 | **Install Guide** | [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) |

  

### Features

This [Discourse](https://www.discourse.org/) plugin allows users to showcase their recent listenings from [ListenBrainz](https://listenbrainz.org/) in their user profile. The users can choose to show their most recent listen or general statistics about their ListenBrainz profile.

ListenBrainz is an online service to keep track of music you listen to and provides you with insights into your listening habits and recommendations. The project is completely open-source and publishes all data as open data.

This plugin is currently in use in the MusicBrainz community forums, but it might be interesting for other music related communities as well.

 ![grafik](https://global.discourse-cdn.com/meta/original/4X/5/c/e/5cee1f7774e9b05dc522d6b5d56184be4d5c6fea.png)

### Configuration

#### Admin settings

You can configure the ListenBrainz plugin in the Discourse admin interface. The following options are available:

- **listenbrainz enable** : Allow users to show their ListenBrainz status in their profiles. Default: enabled.

- **listenbrainz username matches discourse** : Enable this if the usernames of the Discourse users usually match their ListenBrainz usernames. The users can still configure a different ListenBrainz username, but it will be pre-filled with their Discourse username. This option is primarily intended to be used on the [MetaBrainz community forums](https://community.metabrainz.org). Default: disabled.

- **listenbrainz poster icon** : Allow users to show a link to their ListenBrainz profile next to their username in each post. Default: enabled.

- **listenbrainz\_onebox\_enabled** : Enables Onebox support for URLs to ListenBrainz profile pages. Default: enabled.

- **listenbrainz\_onebox\_range** : Statistic time range for ListenBrainz Oneboxes. Default: This month.

#### User preferences

Each user stays in control whether their ListenBrainz activity gets shown in their profile. The users can configure this in their profile preferences. The following preferences are  
available.

- **Show ListenBrainz information in my user profile** : When enabled an infobox with details of the user’s ListenBrainz profile will be shown in the user’s user card and user profile. The content of the infobox can be configured with the options below. Default: disabled.

- **ListenBrainz username** : The user’s ListenBrainz username. Must be set in order for the ListenBrainz details to show up for the user. If **listenbrainz username matches discourse** is enabled for the site than this defaults to the Discourse username, otherwise the default is empty.

- **Show a link to my ListenBrainz profile next to my Discourse username** : When enabled a link to the user’s ListenBrainz profile is shown next to their username in each post. This option is only available if the site has **listenbrainz poster icon** enabled. Default: disabled.

- **Display** : Configures the content shown in the ListenBrainz infobox. The following options are available:

- **Time range** : Select the time range for which the user profile statistics get generated. Default: This month.

- **Fallback to larger time range if there are no listens in the selected range** : If enabled, the profile statistics view will automatically fall back to a larger time range if you had no listens in the selected time range. E.g. if you have selected “This week” but have no listens recorded in the current week then the statistics will fall back to show “This month”. Default: enabled.

- **Show recent listen not older than** : Do not show the user’s last played track if it is older than the given time. Default: 24 hours.

### TODO

Please see the official [issue tracker](https://todo.sr.ht/~phw/discourse-listenbrainz) for open issue and planned features.

---

_[View the full topic](https://meta.discourse.org/t/listenbrainz/254769)._
