diff --git a/README.md b/README.md index 3e115050..954adfab 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ A javascript app to scrobble music you listened to, to [Maloja](https://github.c * [Musikcube](https://foxxmd.github.io/multi-scrobbler/docs/configuration#muikcube) * [MPD (Music Player Daemon)](https://foxxmd.github.io/multi-scrobbler/docs/configuration#mpd-music-player-daemon) * [VLC](https://foxxmd.github.io/multi-scrobbler/docs/configuration#vlc) + * [Azuracast](https://foxxmd.github.io/multi-scrobbler/docs/configuration#azuracast) * Supports scrobbling to many **Clients** * [Maloja](https://foxxmd.github.io/multi-scrobbler/docs/configuration#maloja) * [Last.fm](https://foxxmd.github.io/multi-scrobbler/docs/configuration#lastfm) diff --git a/config/azuracast.json.example b/config/azuracast.json.example index e2bc20e9..73e762ec 100644 --- a/config/azuracast.json.example +++ b/config/azuracast.json.example @@ -5,7 +5,9 @@ "name": "azura", "data": { "url": "ws://192.168.0.101", - "station": "my-station-name" + "station": "my-station-name", + "monitorWhenLive": true, + "monitorWhenListeners": 1 } } ] diff --git a/docsite/docs/configuration/configuration.mdx b/docsite/docs/configuration/configuration.mdx index bfc3fdbb..34b42183 100644 --- a/docsite/docs/configuration/configuration.mdx +++ b/docsite/docs/configuration/configuration.mdx @@ -10,6 +10,7 @@ import SchemaLink from "../../src/components/SchemaLink"; import AIOExample from "../../src/components/AIOExample"; import AIOConfig from '!!raw-loader!../../../config/config.json.example'; +import AzuracastConfig from '!!raw-loader!../../../config/azuracast.json.example'; import ChromecastConfig from '!!raw-loader!../../../config/chromecast.json.example'; import DeezerConfig from '!!raw-loader!../../../config/chromecast.json.example'; import JellyfinConfig from '!!raw-loader!../../../config/jellyfin.json.example'; @@ -1773,6 +1774,67 @@ If you find that VLC is incorrectly reporting track information (in its interfac ] ``` +### [Azuracast](https://www.azuracast.com/) + +The Azuracast server should have **Use High-Performance Now Playing Updates** enabled in _Administration -> System Settings_ + +##### URL + +The URL used by MS to connect to Azuracast has the syntax: + +``` +[ws|wss]://HOST:[PORT] +``` + +MS will automatically add the path required for websockets, [`/api/live/nowplaying/websocket`](https://www.azuracast.com/docs/developers/now-playing-data/#websockets), to your URL if none is provided. If you use a reverse proxy with a path-based URL or otherwise need a custom path to access the websockets path correctly then explicitly provide it. Examples: + +``` +URL From Config => MS Uses + +'ws://192.168.0.101' => ws://192.168.0.101/api/live/nowplaying/websocket +'ws://azura.mydomain.com' => ws://azura.mydomain.com.com/api/live/nowplaying/websocket +'wss://mydomain.com/custom/azura/ws' => wss://mydomain.com/custom/azura/ws +``` + +##### Manual Listening + +A user can manually toggle scrobbling for Azuracast as long as the station is online. On the MS Dashboard use the **Manual Listening** link below the Source status to toggle scrobbling. This will override any automatic scrobbling based on current listeners. + +#### Configuration + + + + | Environmental Variable | Required? | Default | Description | + | :--------------------- | :-------- | :------ | ---------------------------------------------------------------------------------------------- | + | `AZ_URL` | Yes | | Azuracast URL *without station name* | + | `AZ_STATION` | Yes | | The station name shown on the public page | + | `AZURA_LIVE` | No | Yes | Only scrobble when station status is ONLINE | + | `AZURA_LISTENERS_NUM` | No | `true` | Only scrobble if station has any listeners (`true`) or listeners are equal-to/greater-than `X` | + + +
+ + Example + + {AzuracastConfig} + +
+ + or +
+ +
+ + Example + + + +
+ + or +
+
+ ## Client Configurations ### [Maloja](https://github.com/krateng/maloja) diff --git a/docsite/src/pages/index.mdx b/docsite/src/pages/index.mdx index 08d11c2b..118b6782 100644 --- a/docsite/src/pages/index.mdx +++ b/docsite/src/pages/index.mdx @@ -30,6 +30,7 @@ A javascript app to scrobble music you listened to, to [Maloja](https://github.c * [Musikcube](docs/configuration#musikcube) * [MPD (Music Player Daemon)](docs/configuration#mpd-music-player-daemon) * [VLC](docs/configuration#vlc) + * [Azuracast](docs/configuration#azuracast) * Supports scrobbling to many **Clients** * [Maloja](docs/configuration#maloja) * [Last.fm](docs/configuration#lastfm) diff --git a/src/backend/common/infrastructure/config/source/azuracast.ts b/src/backend/common/infrastructure/config/source/azuracast.ts index 30514c57..0dc2fff7 100644 --- a/src/backend/common/infrastructure/config/source/azuracast.ts +++ b/src/backend/common/infrastructure/config/source/azuracast.ts @@ -80,6 +80,8 @@ export interface AzuracastData extends CommonSourceData { /** * Only activate scrobble monitoring if station has a live DJ/Streamer + * + * @default true */ monitorWhenLive?: boolean