Skip to content

Commit 7a0a23b

Browse files
committed
Merge branch 'develop'
2 parents 28910a9 + 1207a5e commit 7a0a23b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+5661
-967
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,40 @@
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
55
[![Docker Pulls](https://img.shields.io/docker/pulls/foxxmd/multi-scrobbler)](https://hub.docker.com/r/foxxmd/multi-scrobbler)
66

7-
A javascript app to scrobble plays from multiple sources to [Maloja](https://github.com/krateng/maloja), [Last.fm](https://www.last.fm), and other clients (eventually!)
7+
A javascript app to scrobble music you listened to, to [Maloja](https://github.com/krateng/maloja), [Last.fm](https://www.last.fm), and [ListenBrainz](https://listenbrainz.org)
88

9-
* Supports scrobbling for many sources
9+
* Supports scrobbling from many **Sources**
1010
* [Spotify](/docs/configuration.md#spotify)
1111
* [Plex](/docs/configuration.md#plex) or [Tautulli](/docs/configuration.md#tautulli)
1212
* [Subsonic-compatible APIs](/docs/configuration.md#subsonic) (like [Airsonic](https://airsonic.github.io/))
1313
* [Jellyfin](/docs/configuration.md#jellyfin)
1414
* [Youtube Music](/docs/configuration.md#youtube-music)
1515
* [Last.fm](/docs/configuration.md#lastfm-source)
16+
* [ListenBrainz](/docs/configuration.md#listenbrainz--source-)
1617
* [Deezer](/docs/configuration.md#deezer)
17-
* Supports scrobbling to many clients
18+
* [MPRIS (Linux Desktop)](/docs/configuration.md#mpris)
19+
* [Mopidy](/docs/configuration.md#mopidy)
20+
* Supports scrobbling to many **Clients**
1821
* [Maloja](/docs/configuration.md#maloja)
1922
* [Last.fm](/docs/configuration.md#lastfm)
20-
* Monitor status of sources and clients using [webhooks (Gotify or Ntfy)](/docs/configuration.md#webhook-configurations) or [healthcheck endpoint](/docs/configuration.md#health-endpoint)
23+
* [ListenBrainz](/docs/configuration.md#listenbrainz)
24+
* Monitor status of Sources and Clients using [webhooks (Gotify or Ntfy)](/docs/configuration.md#webhook-configurations) or [healthcheck endpoint](/docs/configuration.md#health-endpoint)
2125
* Supports configuring for single or multiple users (scrobbling for your friends and family!)
2226
* Web server interface for stats, basic control, and detailed logs
2327
* Smart handling of credentials (persistent, authorization through app)
2428
* Easy configuration through ENVs or JSON
25-
* Built for Docker and unattended use!
29+
* Docker images for x86/ARM
2630

2731
**Why should I use this over a browser extension and/or mobile app scrobbler?**
2832

2933
* **Platform independent** -- Because multi-scrobbler communicates directly with service APIs it will scrobble everything you play regardless of where you play it. No more need for apps on every platform you use!
3034
* **Open-source** -- Get peace of mind knowing exactly how your personal data is being handled.
31-
* **Consolidate play sources** -- Scrobble from many sources to one client with ease and without duplicating tracks.
35+
* **Track your activity regardless of where you listen** -- Scrobble from many Sources to one Client with ease and without duplicating tracks.
3236
* **Manage scrobbling for others** -- Scrobble for your friends and family without any setup on their part. Easily silo sources to specific clients to keep plays separate.
3337

34-
**But I already scrobble my music to Last.fm, is multi-scrobbler for me?**
38+
**But I already scrobble my music to Last.fm/ListenBrainz, is multi-scrobbler for me?**
3539

36-
Yes! You can use [Last.fm as a **Source**](/docs/configuration.md#lastfm--source-) to mirror scrobbles from your Last.fm profile to Maloja. That way you can keep your current scrobble setup as-is but still get the benefit of capturing your data to a self-hosted location.
40+
Yes! You can use [Last.fm as a **Source**](/docs/configuration.md#lastfm--source-) or [Listenbrainz as a **Source**](/docs/configuration.md#listenbrainz--source-) to forward scrobbles from your profile to any other Client! That way you can keep your current scrobble setup as-is but still get the benefit of capturing your data to a self-hosted location.
3741

3842
<img src="/assets/status-ui.jpg" width="800">
3943

@@ -43,7 +47,7 @@ You set up configurations for one or more **Sources** and one or more **Clients*
4347

4448
### Source
4549

46-
A **Source** is a data source that contains information about tracks you are playing like a music player or platform. Examples are **Spotify, Jellyfin, Plex, Airsonic**, etc...
50+
A **Source** is a data source that contains information about tracks you are playing like a music player or platform. Examples are **Spotify, Jellyfin, Plex, Youtube Music, Airsonic**, etc...
4751

4852
Source configurations consist of:
4953

assets/mpris.jpg

35.7 KB
Loading

config/listenbrainz.json.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"name": "brainz",
4+
"configureAs": "client"
5+
"data": {
6+
"token": "029b081ba-9156-4pe7-88e5-3be671f5ea2b",
7+
"username": "FoxxMD"
8+
}
9+
}
10+
]

config/mopidy.json.example

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[
2+
{
3+
"name": "MyMopidy",
4+
"data": {
5+
"url": "localhost",
6+
"uriBlacklist": [],
7+
"uriWhitelist": [],
8+
"albumBlacklist": []
9+
}
10+
}
11+
]

config/mpris.json.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[
2+
{
3+
"name": "ubuntu",
4+
"data": {
5+
"whitelist": ["vlc", "mpd"],
6+
"blacklist": ["spotify"]
7+
}
8+
}
9+
]

docs/configuration.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@
1010
* [Subsonic](#subsonic)
1111
* [Jellyfin](#jellyfin)
1212
* [Last.fm (Source)](#lastfm--source-)
13+
* [Listenbrainz (Source)](#listenbrainz--source-)
1314
* [Deezer](#deezer)
1415
* [Youtube Music](#youtube-music)
16+
* [MPRIS (Linux Desktop)](#mpris)
17+
* [Mopidy](#mopidy)
1518
* [Client Configurations](#client-configurations)
1619
* [Maloja](#maloja)
1720
* [Last.fm](#lastfm)
21+
* [Listenbrainz](#listenbrainz)
1822
* [Monitoring](#monitoring)
1923
* [Webhooks](#webhook-configurations)
2024
* [Health Endpoint](#health-endpoint)
@@ -266,6 +270,20 @@ No support for ENV based for Last.fm as a client (only source)
266270

267271
See [`lastfm.json.example`](/config/lastfm.json.example), change `configureAs` to `source`. Or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FLastfmSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fsource.json)
268272

273+
# [Listenbrainz (Source)](https://listenbrainz.org)
274+
275+
You will need to run your own Listenbrainz server or have an account [on the official instance](https://listenbrainz.org/login/)
276+
277+
On your [profile page](https://listenbrainz.org/profile/) find your **User Token** to use in the configuration.
278+
279+
**NOTE:** You cannot use ENV variables shown in the [Listenbrainz Client config](#listenbrainz) -- multi-scrobbler assumes Listenbrainz ENVs are always used for the **client** configuration. You must use the file-based config from below to setup Listenbrainz as a Source.
280+
281+
### File-Based
282+
283+
See [`listenbrainz.json.example`](/config/listenbrainz.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FListenBrainzSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fsource.json)
284+
285+
**Change `configureAs` to `source`**
286+
269287
## [Deezer](https://deezer.com/)
270288

271289
Create a new application at [Deezer Developers](https://developers.deezer.com/myapps)
@@ -322,6 +340,125 @@ NOTES:
322340

323341
See [`ytmusic.json.example`](/config/ytmusic.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FYTMusicSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fsource.json)
324342

343+
## [MPRIS](https://specifications.freedesktop.org/mpris-spec/latest/)
344+
345+
MPRIS is a standard interface for communicating with Music Players on **linux operating systems.**
346+
347+
If you run Linux and have a notification tray that shows what media you are listening to, you likely have access to MPRIS.
348+
349+
![Notification Tray](/assets/mpris.jpg)
350+
351+
multi-scrobbler can listen to this interface and scrobble tracks played by **any media player** that communicates to the operating system with MPRIS.
352+
353+
**NOTE:** multi-scrobbler needs to be running as a [**Local Installation**](/docs/installation.md#local) in order to use MPRIS. This cannot be used from docker.
354+
355+
### ENV-Based
356+
357+
| Environmental Variable | Required? | Default | Description |
358+
|------------------------|-----------|---------|----------------------------------------------------------------------------------|
359+
| MPRIS_ENABLE | No | | Use MPRIS as a Source (useful when you don't need any other options) |
360+
| MPRIS_BLACKLIST | No | | Comma-delimited list of player names not to scrobble from |
361+
| MPRIS_WHITELIST | No | | Comma-delimited list of players names to ONLY scrobble from. Overrides blacklist |
362+
363+
### File-Based
364+
365+
See [`mpris.json.example`](/config/mpris.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FMPRISSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fsource.json)
366+
367+
## [Mopidy](https://mopidy.com/)
368+
369+
Mopidy is a headless music server that supports playing music from many [standard and non-standard sources such as Pandora, Bandcamp, and Tunein.](https://mopidy.com/ext/)
370+
371+
multi-scrobbler can scrobble tracks played from any Mopidy backend source, regardless of where you listen to them.
372+
373+
### File-Based
374+
375+
See [`mopidy.json.example`](/config/mopidy.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FMopidySourceConfig/%23%2Fdefinitions%2FMopidyData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fsource.json)
376+
377+
Configuration Options:
378+
379+
##### `url`
380+
381+
The URL used to connect to the Mopidy server. You MUST have [Mopidy-HTTP extension](https://mopidy.com/ext/http) enabled.
382+
383+
If no `url` is provided a default is used which assumes Mopidy is installed on the same server as multi-scrobbler: `ws://localhost:6680/mopidy/ws/`
384+
385+
Make sure the hostname and port number match what is found in the Mopidy configuration file `mopidy.conf`:
386+
387+
```
388+
...
389+
390+
[http]
391+
hostname = localhost
392+
port = 6680
393+
394+
...
395+
```
396+
397+
The URL used to connect ultimately must be formed like this: `[protocol]://[hostname]:[port]/[path]`
398+
If any part of this URL is missing multi-scrobbler will use a default value, for your convenience. This also means that if any part of your URL is **not** standard you must explicitly define it.
399+
400+
Part => Default Value
401+
402+
* Protocol => `ws://`
403+
* Hostname => `localhost`
404+
* Port => `6680`
405+
* Path => `/mopidy/ws/`
406+
407+
EX
408+
409+
```json
410+
{
411+
"url": "mopidy.mydomain.com"
412+
}
413+
```
414+
415+
MS transforms this to: `ws://mopidy.mydomain.com:6680/mopidy/ws/`
416+
417+
```json
418+
{
419+
"url": "192.168.0.101:3456"
420+
}
421+
```
422+
423+
MS transforms this to: `ws://192.168.0.101:3456/mopidy/ws/`
424+
425+
```json
426+
{
427+
"url": "mopidy.mydomain.com:80/MOPWS"
428+
}
429+
```
430+
431+
MS transforms this to: `ws://mopidy.mydomain.com:80/MOPWS`
432+
433+
434+
#### URI Blacklist/Whitelist
435+
436+
If you wish to disallow or only allow scrobbling from some sources played through Mopidy you can specify these using `uriBlacklist` or `uriWhitelist` in your config. multi-scrobbler will check the list to see if any string matches the START of the `uri` on a track. If whitelist is used then blacklist is ignored. All strings are case-insensitive.
437+
438+
EX:
439+
440+
```json
441+
{
442+
"uriBlacklist": ["soundcloud"]
443+
}
444+
```
445+
446+
Will prevent multi-scrobbler from scrobbling any Mopidy track that start with a `uri` like `soundcloud:song:MySong-1234`
447+
448+
#### Album Blacklist
449+
450+
For certain sources (Soundcloud) Mopidy does not have all track info (Album) and will instead use "Soundcloud" as the Album name. You can prevent multi-scrobbler from using this bad Album data by adding the fake Album name to this list. Multi-scrobbler will still scrobble the track, just without the bad data. All strings are case-insensitive.
451+
452+
EX:
453+
454+
```json
455+
{
456+
"albumBlacklist": ["SoundCloud", "Mixcloud"]
457+
}
458+
```
459+
460+
If a track would be scrobbled like `Album: Soundcloud, Track: My Cool Track, Artist: A Cool Artist`
461+
then multi-scrobbler will instead scrobble `Track: My Cool Track, Artist: A Cool Artist`
325462

326463
# Client Configurations
327464

@@ -361,6 +498,25 @@ or replace `localhost:9078` with your own base URL
361498

362499
See [`lastfm.json.example`](/config/lastfm.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FLastfmClientConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fclient.json)
363500

501+
## [Listenbrainz](https://listenbrainz.org)
502+
503+
You will need to run your own Listenbrainz server or have an account [on the official instance](https://listenbrainz.org/login/)
504+
505+
On your [profile page](https://listenbrainz.org/profile/) find your **User Token** to use in the configuration.
506+
507+
### ENV-Based
508+
509+
510+
| Environmental Variable | Required? | Default | Description |
511+
|------------------------|-----------|-------------------------------|---------------------------------|
512+
| LZ_TOKEN | Yes | | User token from your LZ profile |
513+
| LZ_USER | Yes | | Your LZ username |
514+
| LZ_URL | No | https://api.listenbrainz.org/ | The base URL for the LZ server |
515+
516+
### File-Based
517+
518+
See [`listenbrainz.json.example`](/config/listenbrainz.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FListenBrainzClientConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fclient.json)
519+
364520
# Monitoring
365521

366522
multi-scrobbler supports some common webhooks and a healthcheck endpoint in order to monitor Sources and Clients for errors.

docs/installation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ SPOTIFY_CLIENT_ID=yourId SPOTIFY_CLIENT_SECRET=yourSecret MALOJA_URL="http://dom
3131

3232
## [Docker](https://hub.docker.com/r/foxxmd/multi-scrobbler)
3333

34+
Cross-platform images are built for x86 (Intel/AMD) and ARM (IE Raspberry Pi)
35+
3436
```
3537
foxxmd/multi-scrobbler:latest
3638
```

docs/plex.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@ Expand the **Watched** dropdown and add the following code block to the **JSON D
4444
"username": "{username}",
4545
"server": "{server_name}",
4646
"version": "{server_version}",
47-
"library": "{library_name}"
47+
"library": "{library_name}",
48+
"player": "{player}",
49+
"device": "{device}",
50+
"platform": "{platform}",
51+
"action": "{action}",
52+
"machine_id": "{machine_id}",
53+
"session_key": "{session_key}"
4854
}
4955
```
5056

0 commit comments

Comments
 (0)