Skip to content

Commit 9ec22e9

Browse files
committed
Merge branch 'develop'
2 parents be599b5 + 9616860 commit 9ec22e9

Some content is hidden

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

43 files changed

+1722
-132
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ A javascript app to scrobble music you listened to, to [Maloja](https://github.c
1414
* [Plex](/docsite/docs/configuration/configuration.md#plex) or [Tautulli](/docsite/docs/configuration/configuration.md#tautulli)
1515
* [Subsonic-compatible APIs](/docsite/docs/configuration/configuration.md#subsonic) (like [Airsonic](https://airsonic.github.io/) and [Navidrome](https://www.navidrome.org/))
1616
* [Jellyfin](/docsite/docs/configuration/configuration.md#jellyfin)
17+
* [WebScrobbler](/docsite/docs/configuration/configuration.md#webscrobbler)
1718
* [Youtube Music](/docsite/docs/configuration/configuration.md#youtube-music)
1819
* [Last.fm](/docsite/docs/configuration/configuration.md#lastfm-source)
1920
* [ListenBrainz](/docsite/docs/configuration/configuration.md#listenbrainz--source-)
@@ -29,6 +30,7 @@ A javascript app to scrobble music you listened to, to [Maloja](https://github.c
2930
* Monitor status of Sources and Clients using [webhooks (Gotify or Ntfy)](/docsite/docs/configuration/configuration.md#webhook-configurations) or [healthcheck endpoint](/docsite/docs/configuration/configuration.md#health-endpoint)
3031
* Supports configuring for single or multiple users (scrobbling for your friends and family!)
3132
* Web server interface for stats, basic control, and detailed logs
33+
* Graceful network and client failure handling (queued scrobbles that auto-retry)
3234
* Smart handling of credentials (persistent, authorization through app)
3335
* Easy configuration through ENVs or JSON
3436
* Install using [Docker images for x86/ARM](/docsite/docs/installation/installation.md#docker), [flatpak](/docsite/docs/installation/installation.md#flatpak), or [locally with NodeJS](/docsite/docs/installation/installation.md#nodejs)

config/subsonic.json.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"data": {
66
"url": "http://localhost:4040/airsonic",
77
"user": "yourUser",
8-
"password": "yourPassword",
8+
"password": "yourPassword"
99
}
1010
}
1111
]

config/webscrobbler.json.example

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

docsite/docs/configuration/configuration.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ title: Overview
2424
* [Mopidy](#mopidy)
2525
* [JRiver](#jriver)
2626
* [Kodi](#kodi)
27+
* [WebScrobbler](#webscrobbler)
2728
* [Client Configurations](#client-configurations)
2829
* [Maloja](#maloja)
2930
* [Last.fm](#lastfm)
@@ -624,6 +625,69 @@ MS transforms this to: `http://mydomain.com:80/kodiReverse/jsonrpc`
624625

625626
See [`kodi.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/kodi.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FKodiSourceConfig/%23%2Fdefinitions%2FKodiData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fsource.json)
626627

628+
## [WebScrobbler](https://web-scrobbler.com/)
629+
630+
After installing the extension open the preferences/settings for it:
631+
632+
* Under **Accounts**
633+
* **Add Webhook**
634+
* API URL: `http://localhost:9078/api/webscrobbler`
635+
* Application name: `(whatever you want)`
636+
637+
Reload the extension after adding the webhook.
638+
639+
* **On Firefox** - Only FQNs (domain.tld), `localhost`, and `127.0.0.1` are supported for API URL due to [firefox requiring https](https://github.com/web-scrobbler/web-scrobbler/issues/4183#issuecomment-1749222006)
640+
* **On Chromium-based Browsers** - Any domain will work for API URL
641+
* All Other browsers are untested
642+
643+
#### Multiple Users
644+
645+
If you would like use multiple WebScrobbler sources they can be matched using a **slug** at the end of the **API URL.** This requires using [a file-based config.](#file-based-configuration)
646+
647+
Example:
648+
649+
In `webscrobbler.json`
650+
651+
```json
652+
[
653+
{
654+
"name": "aUserWS",
655+
"clients": [
656+
"client1Maloja"
657+
],
658+
"data": {
659+
"slug": "usera"
660+
}
661+
},
662+
{
663+
"name": "bUserWS",
664+
"clients": [
665+
"client2Maloja"
666+
],
667+
"data": {
668+
"slug": "userb"
669+
}
670+
}
671+
]
672+
```
673+
674+
* To use `aUserWS` source set **API URL** to `http://localhost:9078/api/webscrobbler/usera`
675+
* To use `bUserWS` source set **API URL** to `http://localhost:9078/api/webscrobbler/userb`
676+
677+
Note: `http://localhost:9078/api/webscrobbler` is matched with the first source that _that does not have a slug defined._
678+
679+
### ENV-Based
680+
681+
| Environmental Variable | Required? | Default | Description |
682+
|------------------------|-----------|---------|--------------------------------------------------------------------------|
683+
| WS_ENABLE | No | | Set to 'true' to enable WS without needing to define other ENVs |
684+
| WS_WHITELIST | No | | Only scrobble from these WebScrobbler Connectors. Comma-delimited list |
685+
| WS_BLACKLIST | No | | Do not scrobble from these WebScrobbler Connectors. Comma-delimited list |
686+
687+
### File-Based
688+
689+
See [`webscrobbler.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/webscrobbler.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FWebScrobblerSourceConfig/%23%2Fdefinitions%2FWebScrobblerData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fsource.json)
690+
627691
# Client Configurations
628692

629693
## [Maloja](https://github.com/krateng/maloja)

docsite/src/pages/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ A javascript app to scrobble music you listened to, to [Maloja](https://github.c
1717
* [Plex](docs/configuration#plex) or [Tautulli](docs/configuration#tautulli)
1818
* [Subsonic-compatible APIs](docs/configuration#subsonic) (like [Airsonic](https://airsonic.github.io/) and [Navidrome](https://www.navidrome.org/))
1919
* [Jellyfin](docs/configuration#jellyfin)
20+
* [WebScrobbler](docs/configuration#webscrobbler)
2021
* [Youtube Music](docs/configuration#youtube-music)
2122
* [Last.fm](docs/configuration#lastfm-source)
2223
* [ListenBrainz](docs/configuration#listenbrainz--source-)
@@ -32,6 +33,7 @@ A javascript app to scrobble music you listened to, to [Maloja](https://github.c
3233
* Monitor status of Sources and Clients using [webhooks (Gotify or Ntfy)](docs/configuration#webhook-configurations) or [healthcheck endpoint](docs/configuration#health-endpoint)
3334
* Supports configuring for single or multiple users (scrobbling for your friends and family!)
3435
* Web server interface for stats, basic control, and detailed logs
36+
* Graceful network and client failure handling (queued scrobbles that auto-retry)
3537
* Smart handling of credentials (persistent, authorization through app)
3638
* Easy configuration through ENVs or JSON
3739
* Install using [Docker images for x86/ARM](docs/installation#docker), [flatpak](docs/installation#flatpak), or [locally with NodeJS](docs/installation#nodejs)

flatpak/io.github.foxxmd.multiscrobbler.metainfo.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
</screenshot>
4242
</screenshots>
4343
<releases>
44+
<release version="0.6.1" date="2023-10-24"/>
4445
<release version="0.6.0" date="2023-10-04"/>
4546
<release version="0.5.2" date="2023-09-21"/>
4647
<release version="0.5.0" date="2023-08-29"/>

flatpak/io.github.foxxmd.multiscrobbler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ modules:
5353
sources:
5454
- type: git
5555
url: https://github.com/FoxxMD/multi-scrobbler
56-
branch: develop
56+
#branch: develop
5757
# in official builds use tag/commit instead of branch
58-
# tag: 0.6.0
59-
# commit: 7037d6f8332f323312ffc5712f48a1ce96026d97
58+
tag: 0.6.0
59+
commit: 7037d6f8332f323312ffc5712f48a1ce96026d97
6060
dest: main
6161
# Wrapper to launch the app
6262
- type: script

package-lock.json

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "multi-scrobbler",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "scrobble plays from multiple sources to multiple clients",
55
"scripts": {
66
"schema": "npm run -s schema-aio & npm run -s schema-source & npm run -s schema-client & npm run -s schema-aiosource & npm run -s schema-aioclient",
@@ -60,6 +60,7 @@
6060
"ajv": "^7.2.4",
6161
"better-sse": "^0.8.0",
6262
"body-parser": "^1.19.0",
63+
"clsx": "^2.0.0",
6364
"common-tags": "^1.8.2",
6465
"compare-versions": "^4.1.2",
6566
"concat-stream": "^2.0.0",

src/backend/common/infrastructure/Atomic.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import {Logger} from '@foxxmd/winston';
44
import TupleMap from "../TupleMap";
55
import {Request, Response} from "express";
66
import {NextFunction, ParamsDictionary, Query} from "express-serve-static-core";
7-
import { LogLevel, logLevels, PlayMeta, PlayObject } from "../../../core/Atomic";
7+
import {LogLevel, logLevels, PlayMeta, PlayObject} from "../../../core/Atomic";
88

9-
export type SourceType = 'spotify' | 'plex' | 'tautulli' | 'subsonic' | 'jellyfin' | 'lastfm' | 'deezer' | 'ytmusic' | 'mpris' | 'mopidy' | 'listenbrainz' | 'jriver' | 'kodi';
10-
export const sourceTypes: SourceType[] = ['spotify', 'plex', 'tautulli', 'subsonic', 'jellyfin', 'lastfm', 'deezer', 'ytmusic', 'mpris', 'mopidy', 'listenbrainz', 'jriver', 'kodi'];
9+
export type SourceType = 'spotify' | 'plex' | 'tautulli' | 'subsonic' | 'jellyfin' | 'lastfm' | 'deezer' | 'ytmusic' | 'mpris' | 'mopidy' | 'listenbrainz' | 'jriver' | 'kodi' | 'webscrobbler';
10+
export const sourceTypes: SourceType[] = ['spotify', 'plex', 'tautulli', 'subsonic', 'jellyfin', 'lastfm', 'deezer', 'ytmusic', 'mpris', 'mopidy', 'listenbrainz', 'jriver', 'kodi', 'webscrobbler'];
1111

1212
export const lowGranularitySources: SourceType[] = ['subsonic','ytmusic'];
1313

@@ -213,7 +213,3 @@ export const TIME_WEIGHT = 0.5;
213213
export const REFERENCE_WEIGHT = 0.5;
214214
export const DUP_SCORE_THRESHOLD = 1;
215215

216-
export interface SourceScrobble {
217-
source: string
218-
play: PlayObject
219-
}

0 commit comments

Comments
 (0)