[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
0

Configure Feed

Select the types of activity you want to include in your feed.

docs: Parse and render config examples from repository

FoxxMD (Jul 17, 2024, 9:51 AM EDT) b02c96ad 52b20e4c

+545 -107
+396 -104
docsite/docs/configuration/configuration.mdx
··· 5 5 --- 6 6 import Tabs from '@theme/Tabs'; 7 7 import TabItem from '@theme/TabItem'; 8 - import Admonition from '@theme/Admonition'; 8 + import CodeBlock from '@theme/CodeBlock'; 9 + import SchemaLink from "../../src/components/SchemaLink"; 10 + import AIOExample from "../../src/components/AIOExample"; 11 + 12 + import AIOConfig from '!!raw-loader!../../../config/config.json.example'; 13 + import ChromecastConfig from '!!raw-loader!../../../config/chromecast.json.example'; 14 + import DeezerConfig from '!!raw-loader!../../../config/chromecast.json.example'; 15 + import JellyfinConfig from '!!raw-loader!../../../config/jellyfin.json.example'; 16 + import JriverfinConfig from '!!raw-loader!../../../config/jriver.json.example'; 17 + import KodiConfig from '!!raw-loader!../../../config/kodi.json.example'; 18 + import LastfmConfig from '!!raw-loader!../../../config/lastfm.json.example'; 19 + import ListenbrainzConfig from '!!raw-loader!../../../config/listenbrainz.json.example'; 20 + import MalojaConfig from '!!raw-loader!../../../config/maloja.json.example'; 21 + import MopidyConfig from '!!raw-loader!../../../config/mopidy.json.example'; 22 + import MprisConfig from '!!raw-loader!../../../config/mpris.json.example'; 23 + import MusikcubeConfig from '!!raw-loader!../../../config/musikcube.json.example'; 24 + import PlexConfig from '!!raw-loader!../../../config/plex.json.example'; 25 + import SpotifyConfig from '!!raw-loader!../../../config/spotify.json.example'; 26 + import SubsonicConfig from '!!raw-loader!../../../config/subsonic.json.example'; 27 + import TautulliConfig from '!!raw-loader!../../../config/tautulli.json.example'; 28 + import WebscrobblerConfig from '!!raw-loader!../../../config/webscrobbler.json.example'; 29 + import YTMusicConfig from '!!raw-loader!../../../config/ytmusic.json.example'; 9 30 10 31 # Configuration 11 32 ··· 41 62 MS will parse configuration files located in the directory specified by the `CONFIG_DIR` environmental variable. This variable defaults to: 42 63 43 64 * Local installation -> `PROJECT_DIR/config` 44 - * Docker -> `/config` (in the container) -- see the [install docs](../installation/installation.md#docker) for how to configure this correctly 65 + * Docker -> `/config` (in the container) -- see the [install docs](../installation/installation.mdx#docker) for how to configure this correctly 45 66 46 67 <details> 47 68 ··· 56 77 57 78 </details> 58 79 59 - There are **example configurations** for all Source/Client types and AIO config located in the [`/config`](https://github.com/FoxxMD/multi-scrobbler/tree/master/config) directory of this project. These can be used as-is by renaming them to `.json`. 60 - For docker installations these examples are copied to your configuration directory on first-time use. There is also a [**kitchensink example**](kitchensink.md) that provides examples of using all sources/clients in a complex configuration. 80 + :::tip 81 + * There are **example configurations** for all Source/Client types and AIO config located in the [`/config`](https://github.com/FoxxMD/multi-scrobbler/tree/master/config) directory of this project. These can be used as-is by renaming them to `.json`. 82 + * For docker/flatpak installations these examples are copied to your configuration directory on first-time use. 83 + * There is also a [**kitchensink example**](kitchensink.md) that provides examples of using all sources/clients in a complex configuration. 84 + ::: 61 85 62 86 Each file is named by the **type** of the Client/Source found in below sections. Each file as an **array** of that type of Client/Source. 63 87 ··· 73 97 <details> 74 98 <summary>Config Example</summary> 75 99 76 - ```json5 title="/CONFIG_DIR/maloja.json" 77 - [ 78 - { 79 - "name": "myFirstMalojaClient", 80 - "data": { 81 - "url": "http://myMalojaServer.example", 82 - "apiKey": "myKey" 83 - } 84 - }, 85 - { 86 - "name": "mySecondMalojaClient", 87 - "data": { 88 - "url": "http://my2ndMalojaServer.example", 89 - "apiKey": "myKey" 90 - } 91 - } 92 - ] 93 - 94 - ``` 100 + <CodeBlock title="CONFIG_DIR/spotify.json" language="json5">{SpotifyConfig}</CodeBlock> 95 101 96 102 </details> 97 103 </TabItem> ··· 99 105 MS will parse an **all-in-one** configuration file located in the directory specified by the `CONFIG_DIR` environmental variable. This variable defaults to: 100 106 101 107 * Local installation -> `PROJECT_DIR/config/config.json` 102 - * Docker -> `/config/config.json` (in the container) -- see the [install docs](../installation/installation.md#docker) for how to configure this correctly 108 + * Docker -> `/config/config.json` (in the container) -- see the [install docs](../installation/installation.mdx#docker) for how to configure this correctly 103 109 104 110 <details> 105 111 ··· 116 122 117 123 **The AIO config also enables setting default options for sources/clients as well as global options for MS itself.** 118 124 119 - An example AIO config files can be found at [/config/config.json.example](https://github.com/FoxxMD/multi-scrobbler/tree/master/config/config.json.example) in the project directory. For docker installations theis example is copied to your configuration directory on first-time use. There is also a [**kitchensink example**](kitchensink.md) that provides examples of using all sources/clients in a complex AOI configuration. 125 + :::tip 126 + * An example AIO config files can be found in the project directory at [`/config/config.json.example`](https://github.com/FoxxMD/multi-scrobbler/tree/master/config/config.json.example) 127 + * For docker/flatpak installations this example is copied to your configuration directory on first-time use. 128 + * There is also a [**kitchensink example**](kitchensink.md) that provides examples of using all sources/clients in a complex configuration. 129 + ::: 120 130 121 131 [**Explore the schema for this configuration, along with an example generator and validator, here**](https://json-schema.app/view/%23?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Faio.json) 122 132 ··· 124 134 125 135 <summary>Config Example</summary> 126 136 127 - ```json title="/CONFIG_DIR/config.json" 128 - { 129 - "sources": [ 130 - { 131 - "name": "myConfig", 132 - "type": "spotify", 133 - "clients": [ 134 - "myMalojaClient" 135 - ], 136 - "data": { 137 - "clientId": "anExample" 138 - "clientSecret": "anExample", 139 - "redirectUri": "http://localhost:9078/callback" 140 - } 141 - } 142 - ], 143 - "clients": [ 144 - { 145 - "name": "myMalojaClient", 146 - "type": "maloja", 147 - "data": { 148 - "url": "http://myMalojaServer.example", 149 - "apiKey": "myKey" 150 - } 151 - } 152 - ] 153 - } 154 - ``` 137 + <CodeBlock title="CONFIG_DIR/config.json" language="json5">{AIOConfig}</CodeBlock> 155 138 156 139 </details> 157 140 </TabItem> ··· 169 152 * Set with [ENV](./configuration?configType=env#configuration-types) `BASE_URL` or `baseUrl` [all-in-one configuration](./configuration?configType=aio#configuration-types) 170 153 * If protocol is `http` or no protocol is specified MS will try to use port `9078` -- to override this explicitly set the port or use `https` 171 154 172 - Useful when running with [docker](../installation/installation.md#docker) so that you do not need to specify redirect URLs for each configuration. 155 + Useful when running with [docker](../installation/installation.mdx#docker) so that you do not need to specify redirect URLs for each configuration. 173 156 174 157 <details> 175 158 ··· 231 214 | `SPOTIFY_REDIRECT_URI` | No | `http://localhost:9078/callback` | URI must end in `callback` | 232 215 </TabItem> 233 216 <TabItem value="file" label="File"> 234 - See [`spotify.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/spotify.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FSpotifySourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 217 + <details> 218 + 219 + <summary>Example</summary> 220 + 221 + <CodeBlock title="CONFIG_DIR/spotify.json" language="json5">{SpotifyConfig}</CodeBlock> 222 + 223 + </details> 224 + 225 + or <SchemaLink lower objectName="SpotifySourceConfig"/> 235 226 </TabItem> 236 227 <TabItem value="aio" label="AIO"> 237 - See [`spotify.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/spotify.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FSpotifySourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 228 + <details> 229 + 230 + <summary>Example</summary> 231 + 232 + <AIOExample data={SpotifyConfig} name="spotify"/> 233 + 234 + </details> 235 + or <SchemaLink lower objectName="SpotifySourceConfig"/> 238 236 </TabItem> 239 237 </Tabs> 240 238 ··· 251 249 | `PLEX_USER` | No | | The a comma-delimited list of usernames to scrobble tracks for. No usernames specified means all tracks by all users will be scrobbled. | 252 250 </TabItem> 253 251 <TabItem value="file" label="File"> 254 - See [`plex.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/plex.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FPlexSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 252 + 253 + <details> 254 + 255 + <summary>Example</summary> 256 + 257 + <CodeBlock title="CONFIG_DIR/plex.json" language="json5">{PlexConfig}</CodeBlock> 258 + 259 + </details> 260 + 261 + or <SchemaLink lower objectName="PlexSourceConfig"/> 255 262 </TabItem> 256 263 <TabItem value="aio" label="AIO"> 257 - See [`plex.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/plex.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FPlexSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 264 + <details> 265 + 266 + <summary>Example</summary> 267 + 268 + <AIOExample data={PlexConfig} name="plex"/> 269 + 270 + </details> 271 + 272 + or <SchemaLink lower objectName="PlexSourceConfig"/> 258 273 </TabItem> 259 274 </Tabs> 260 275 ··· 271 286 | `TAUTULLI_USER` | No | | The a comma-delimited list of usernames to scrobble tracks for. No usernames specified means all tracks by all users will be scrobbled. | 272 287 </TabItem> 273 288 <TabItem value="file" label="File"> 274 - See [`tautulli.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/tautulli.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FTautulliSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 289 + 290 + <details> 291 + 292 + <summary>Example</summary> 293 + 294 + <CodeBlock title="CONFIG_DIR/tautulli.json" language="json5">{TautulliConfig}</CodeBlock> 295 + 296 + </details> 297 + 298 + or <SchemaLink lower objectName="TautulliSourceConfig"/> 275 299 </TabItem> 276 300 <TabItem value="aio" label="AIO"> 277 - See [`tautulli.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/tautulli.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FTautulliSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 301 + <details> 302 + 303 + <summary>Example</summary> 304 + 305 + <AIOExample data={TautulliConfig} name="tautulli"/> 306 + 307 + </details> 308 + 309 + or <SchemaLink lower objectName="TautulliSourceConfig"/> 278 310 </TabItem> 279 311 </Tabs> 280 312 ··· 300 332 | `SUBSONIC_URL` | Yes | | Base url of your subsonic-api server | 301 333 </TabItem> 302 334 <TabItem value="file" label="File"> 303 - See [`subsonic.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/subsonic.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FSubSonicSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 335 + <details> 336 + 337 + <summary>Example</summary> 338 + 339 + <CodeBlock title="CONFIG_DIR/subsonic.json" language="json5">{SubsonicConfig}</CodeBlock> 340 + 341 + </details> 342 + 343 + or <SchemaLink lower objectName="SubSonicSourceConfig"/> 304 344 </TabItem> 305 345 <TabItem value="aio" label="AIO"> 306 - See [`subsonic.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/subsonic.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FSubSonicSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 346 + <details> 347 + 348 + <summary>Example</summary> 349 + 350 + <AIOExample data={SubsonicConfig} name="subsonic"/> 351 + 352 + </details> 353 + 354 + or <SchemaLink lower objectName="SubSonicSourceConfig"/> 307 355 </TabItem> 308 356 </Tabs> 309 357 ··· 340 388 | `JELLYFIN_SERVER` | | | Comma-separated list of Jellyfin server names to scrobble from | 341 389 </TabItem> 342 390 <TabItem value="file" label="File"> 343 - See [`jellyfin.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/jellyfin.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FJellySourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 391 + <details> 392 + 393 + <summary>Example</summary> 394 + 395 + <CodeBlock title="CONFIG_DIR/jellyfin.json" language="json5">{JellyfinConfig}</CodeBlock> 396 + 397 + </details> 398 + 399 + or <SchemaLink lower objectName="JellySourceConfig"/> 400 + 344 401 </TabItem> 345 402 <TabItem value="aio" label="AIO"> 346 - See [`jellyfin.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/jellyfin.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FJellySourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 403 + <details> 404 + 405 + <summary>Example</summary> 406 + 407 + <AIOExample data={JellyfinConfig} name="jellyfin"/> 408 + 409 + </details> 410 + 411 + or <SchemaLink lower objectName="JellySourceConfig"/> 347 412 </TabItem> 348 413 </Tabs> 349 414 ··· 358 423 No support for ENV based for Last.fm as a client (only source) 359 424 </TabItem> 360 425 <TabItem value="file" label="File"> 361 - See [`lastfm.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 362 - </TabItem> 426 + <details> 427 + Change `configureAs` to `source` 428 + 429 + <summary>Example</summary> 430 + 431 + <CodeBlock title="CONFIG_DIR/lastfm.json" language="json5">{LastfmConfig}</CodeBlock> 432 + 433 + </details> 434 + 435 + or <SchemaLink lower objectName="LastfmSourceConfig"/> 436 + </TabItem> 363 437 <TabItem value="aio" label="AIO"> 364 - See [`lastfm.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 438 + <details> 439 + Change `configureAs` to `source` 440 + 441 + <summary>Example</summary> 442 + 443 + <AIOExample data={LastfmConfig} name="lastfm"/> 444 + 445 + </details> 446 + 447 + or <SchemaLink lower objectName="LastfmSourceConfig"/> 365 448 </TabItem> 366 449 </Tabs> 367 450 ··· 376 459 377 460 <Tabs groupId="configType" queryString> 378 461 <TabItem value="env" label="ENV"> 379 - <Admonition type="note"> 462 + :::note 380 463 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. 381 - </Admonition> 464 + ::: 382 465 </TabItem> 383 466 <TabItem value="file" label="File"> 384 - See [`listenbrainz.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 467 + <details> 468 + Change `configureAs` to `source` 385 469 386 - **Change `configureAs` to `source`** 470 + <summary>Example</summary> 471 + 472 + <CodeBlock title="CONFIG_DIR/listenbrainz.json" language="json5">{ListenbrainzConfig}</CodeBlock> 473 + 474 + </details> 475 + 476 + or <SchemaLink lower objectName="ListenBrainzSourceConfig"/> 387 477 </TabItem> 388 478 <TabItem value="aio" label="AIO"> 389 - See [`listenbrainz.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 479 + <details> 480 + Change `configureAs` to `source` 390 481 391 - **Change `configureAs` to `source`** 482 + <summary>Example</summary> 483 + 484 + <AIOExample data={ListenbrainzConfig} name="listenbrainz"/> 485 + 486 + </details> 487 + 488 + or <SchemaLink lower objectName="ListenBrainzSourceConfig"/> 392 489 </TabItem> 393 490 </Tabs> 394 491 ··· 421 518 | `DEEZER_REDIRECT_URI` | No | `http://localhost:9078/deezer/callback` | URI must end in `deezer/callback` | 422 519 </TabItem> 423 520 <TabItem value="file" label="File"> 424 - See [`deezer.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/deezer.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FDeezerSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 521 + <details> 522 + 523 + <summary>Example</summary> 524 + 525 + <CodeBlock title="CONFIG_DIR/deezer.json" language="json5">{DeezerConfig}</CodeBlock> 526 + 527 + </details> 528 + 529 + or <SchemaLink lower objectName="DeezerSourceConfig"/> 425 530 </TabItem> 426 531 <TabItem value="aio" label="AIO"> 427 - See [`deezer.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/deezer.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FDeezerSourceConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 532 + <details> 533 + 534 + <summary>Example</summary> 535 + 536 + <AIOExample data={DeezerConfig} name="deezer"/> 537 + 538 + </details> 539 + 540 + or <SchemaLink lower objectName="DeezerSourceConfig"/> 428 541 </TabItem> 429 542 </Tabs> 430 543 ··· 459 572 No ENV support 460 573 </TabItem> 461 574 <TabItem value="file" label="File"> 462 - See [`ytmusic.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 575 + <details> 576 + 577 + <summary>Example</summary> 578 + 579 + <CodeBlock title="CONFIG_DIR/youtube.json" language="json5">{YTMusicConfig}</CodeBlock> 580 + 581 + </details> 582 + 583 + or <SchemaLink lower objectName="YTMusicSourceConfig"/> 463 584 </TabItem> 464 585 <TabItem value="aio" label="AIO"> 465 - See [`ytmusic.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 586 + <details> 587 + 588 + <summary>Example</summary> 589 + 590 + <AIOExample data={YTMusicConfig} name="youtube"/> 591 + 592 + </details> 593 + 594 + or <SchemaLink lower objectName="YTMusicSourceConfig"/> 466 595 </TabItem> 467 596 </Tabs> 468 597 ··· 478 607 479 608 :::note 480 609 481 - multi-scrobbler needs to be running as a [**Local Installation**](../installation/installation.md#nodejs) in order to use MPRIS. This cannot be used from docker. 610 + multi-scrobbler needs to be running as a [**Local Installation**](../installation/installation.mdx#nodejs) in order to use MPRIS. This cannot be used from docker. 482 611 483 612 ::: 484 613 ··· 493 622 | MPRIS_WHITELIST | No | | Comma-delimited list of players names to ONLY scrobble from. Overrides blacklist | 494 623 </TabItem> 495 624 <TabItem value="file" label="File"> 496 - See [`mpris.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 625 + <details> 626 + 627 + <summary>Example</summary> 628 + 629 + <CodeBlock title="CONFIG_DIR/mpris.json" language="json5">{MprisConfig}</CodeBlock> 630 + 631 + </details> 632 + 633 + or <SchemaLink lower objectName="MPRISSourceConfig"/> 497 634 </TabItem> 498 635 <TabItem value="aio" label="AIO"> 499 - See [`mpris.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 636 + <details> 637 + 638 + <summary>Example</summary> 639 + 640 + <AIOExample data={MprisConfig} name="mpris"/> 641 + 642 + </details> 643 + 644 + or <SchemaLink lower objectName="MPRISSourceConfig"/> 500 645 </TabItem> 501 646 </Tabs> 502 647 ··· 513 658 No ENV support 514 659 </TabItem> 515 660 <TabItem value="file" label="File"> 516 - See [`mopidy.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 661 + <details> 662 + 663 + <summary>Example</summary> 664 + 665 + <CodeBlock title="CONFIG_DIR/mopidy.json" language="json5">{MopidyConfig}</CodeBlock> 666 + 667 + </details> 668 + 669 + or <SchemaLink lower objectName="MopidySourceConfig"/> 517 670 </TabItem> 518 671 <TabItem value="aio" label="AIO"> 519 - See [`mopidy.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 672 + <details> 673 + 674 + <summary>Example</summary> 675 + 676 + <AIOExample data={MopidyConfig} name="mopidy"/> 677 + 678 + </details> 679 + 680 + or <SchemaLink lower objectName="MopidySourceConfig"/> 520 681 </TabItem> 521 682 </Tabs> 522 683 ··· 670 831 | JRIVER_PASSWORD | No | | If authenticated is enabled, the password set | 671 832 </TabItem> 672 833 <TabItem value="file" label="File"> 673 - See [`jriver.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/jriver.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FJRiverSourceConfig/%23%2Fdefinitions%2FJRiverData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 674 - </TabItem> 834 + <details> 835 + 836 + <summary>Example</summary> 837 + 838 + <CodeBlock title="CONFIG_DIR/jriver.json" language="json5">{JriverfinConfig}</CodeBlock> 839 + 840 + </details> 841 + 842 + or <SchemaLink lower objectName="JRiverSourceConfig"/> 843 + </TabItem> 675 844 <TabItem value="aio" label="AIO"> 676 - See [`jriver.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/jriver.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FJRiverSourceConfig/%23%2Fdefinitions%2FJRiverData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 845 + <details> 846 + 847 + <summary>Example</summary> 848 + 849 + <AIOExample data={JriverfinConfig} name="jriver"/> 850 + 851 + </details> 852 + 853 + or <SchemaLink lower objectName="JRiverSourceConfig"/> 677 854 </TabItem> 678 855 </Tabs> 679 856 ··· 742 919 | KODI_PASSWORD | No | | The password set | 743 920 </TabItem> 744 921 <TabItem value="file" label="File"> 745 - 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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 922 + <details> 923 + 924 + <summary>Example</summary> 925 + 926 + <CodeBlock title="CONFIG_DIR/kodi.json" language="json5">{KodiConfig}</CodeBlock> 927 + 928 + </details> 929 + 930 + or <SchemaLink lower objectName="KodiSourceConfig"/> 746 931 </TabItem> 747 932 <TabItem value="aio" label="AIO"> 748 - 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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 933 + <details> 934 + 935 + <summary>Example</summary> 936 + 937 + <AIOExample data={KodiConfig} name="kodi"/> 938 + 939 + </details> 940 + 941 + or <SchemaLink lower objectName="KodiSourceConfig"/> 749 942 </TabItem> 750 943 </Tabs> 751 944 ··· 770 963 771 964 Example: 772 965 773 - In `webscrobbler.json` 774 - 775 - ```json 966 + ```json title="webscrobbler.json" 776 967 [ 777 968 { 778 969 "name": "aUserWS", ··· 825 1016 | WS_BLACKLIST | No | | Do not scrobble from these WebScrobbler Connectors. Comma-delimited list | 826 1017 </TabItem> 827 1018 <TabItem value="file" label="File"> 828 - 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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 1019 + <details> 1020 + 1021 + <summary>Example</summary> 1022 + 1023 + <CodeBlock title="CONFIG_DIR/webscrobbler.json" language="json5">{WebscrobblerConfig}</CodeBlock> 1024 + 1025 + </details> 1026 + 1027 + or <SchemaLink lower objectName="WebScrobblerSourceConfig"/> 829 1028 </TabItem> 830 1029 <TabItem value="aio" label="AIO"> 831 - 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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 1030 + <details> 1031 + 1032 + <summary>Example</summary> 1033 + 1034 + <AIOExample data={WebscrobblerConfig} name="webscrobbler"/> 1035 + 1036 + </details> 1037 + 1038 + or <SchemaLink lower objectName="WebScrobblerSourceConfig"/> 832 1039 </TabItem> 833 1040 </Tabs> 834 1041 ··· 954 1161 955 1162 <Tabs groupId="configType" queryString> 956 1163 <TabItem value="env" label="ENV"> 957 - <Admonition type="note"> 1164 + :::note 958 1165 [Manually configuring cast device connections](#connecting-devices) is only available through file-based config. 959 - </Admonition> 1166 + ::: 960 1167 961 1168 | Environmental Variable | Required? | Default | Description | 962 1169 |------------------------|-----------|---------|--------------------------------------------------------------------------------------| ··· 967 1174 | CC_BLACKLIST_APPS | No | | Do not scrobble from these casted Apps. Comma-delimited list | 968 1175 </TabItem> 969 1176 <TabItem value="file" label="File"> 970 - See [`chromecast.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/chromecast.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FChromecastSourceConfig/%23%2Fdefinitions%2FChromecastData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 1177 + 1178 + <details> 1179 + 1180 + <summary>Example</summary> 1181 + 1182 + <CodeBlock title="CONFIG_DIR/chromecast.json" language="json5">{ChromecastConfig}</CodeBlock> 1183 + 1184 + </details> 1185 + 1186 + or <SchemaLink lower objectName="ChromecastSourceConfig"/> 971 1187 </TabItem> 972 1188 <TabItem value="aio" label="AIO"> 973 - See [`chromecast.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/chromecast.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FChromecastSourceConfig/%23%2Fdefinitions%2FChromecastData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 1189 + <details> 1190 + 1191 + <summary>Example</summary> 1192 + 1193 + <AIOExample data={ChromecastConfig} name="chromecast"/> 1194 + 1195 + </details> 1196 + 1197 + or <SchemaLink lower objectName="ChromecastSourceConfig"/> 974 1198 </TabItem> 975 1199 </Tabs> 976 1200 ··· 1005 1229 | `MC_PASSWORD` | Yes | | | 1006 1230 </TabItem> 1007 1231 <TabItem value="file" label="File"> 1008 - See [`musikcube.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/chromecast.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FMuikcubeSourceConfig/%23%2Fdefinitions%2FMuikcubeData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 1232 + <details> 1233 + 1234 + <summary>Example</summary> 1235 + 1236 + <CodeBlock title="CONFIG_DIR/musikcube.json" language="json5">{MusikcubeConfig}</CodeBlock> 1237 + 1238 + </details> 1239 + 1240 + or <SchemaLink lower objectName="MusikcubeSourceConfig"/> 1009 1241 </TabItem> 1010 1242 <TabItem value="aio" label="AIO"> 1011 - See [`musikcube.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/chromecast.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FMuikcubeSourceConfig/%23%2Fdefinitions%2FMuikcubeData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json) 1243 + <details> 1244 + 1245 + <summary>Example</summary> 1246 + 1247 + <AIOExample data={MusikcubeConfig} name="musikcube"/> 1248 + 1249 + </details> 1250 + 1251 + or <SchemaLink lower objectName="MusikcubeSourceConfig"/> 1012 1252 </TabItem> 1013 1253 </Tabs> 1014 1254 ··· 1026 1266 | `MALOJA_API_KEY` | Yes | | Api Key | 1027 1267 </TabItem> 1028 1268 <TabItem value="file" label="File"> 1029 - See [`maloja.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/maloja.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FMalojaClientConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fclient.json) 1269 + 1270 + <details> 1271 + 1272 + <summary>Example</summary> 1273 + 1274 + <CodeBlock title="CONFIG_DIR/maloja.json" language="json5">{MalojaConfig}</CodeBlock> 1275 + 1276 + </details> 1277 + 1278 + or <SchemaLink client lower objectName="MalojaClientConfig"/> 1030 1279 </TabItem> 1031 1280 <TabItem value="aio" label="AIO"> 1032 - See [`maloja.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/config/maloja.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23/%23%2Fdefinitions%2FMalojaClientConfig?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fclient.json) 1281 + <details> 1282 + 1283 + <summary>Example</summary> 1284 + 1285 + <AIOExample client data={MalojaConfig} name="maloja"/> 1286 + 1287 + </details> 1288 + 1289 + or <SchemaLink client lower objectName="MalojaClientConfig"/> 1033 1290 </TabItem> 1034 1291 </Tabs> 1035 1292 ··· 1053 1310 | `LASTFM_SECRET` | Yes | | Shared secret from your API Account | 1054 1311 | `LASTFM_REDIRECT_URI` | No | `http://localhost:9078/lastfm/callback` | Url to use for authentication. Must include `lastfm/callback` somewhere in it | 1055 1312 | `LASTFM_SESSION` | No | | Session id. Will be generated by authentication flow if not provided. | 1313 + LastfmClientConfig 1056 1314 </TabItem> 1057 1315 <TabItem value="file" label="File"> 1058 - See [`lastfm.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fclient.json) 1316 + 1317 + <details> 1318 + 1319 + <summary>Example</summary> 1320 + 1321 + <CodeBlock title="CONFIG_DIR/lastfm.json" language="json5">{LastfmConfig}</CodeBlock> 1322 + 1323 + </details> 1324 + 1325 + or <SchemaLink client lower objectName="LastfmClientConfig"/> 1059 1326 </TabItem> 1060 1327 <TabItem value="aio" label="AIO"> 1061 - See [`lastfm.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fclient.json) 1328 + <details> 1329 + 1330 + <summary>Example</summary> 1331 + 1332 + <AIOExample client data={LastfmConfig} name="lastfm"/> 1333 + 1334 + </details> 1335 + 1336 + or <SchemaLink client lower objectName="LastfmClientConfig"/> 1062 1337 </TabItem> 1063 1338 </Tabs> 1064 1339 ··· 1079 1354 | LZ_URL | No | https://api.listenbrainz.org/ | The base URL for the LZ server | 1080 1355 </TabItem> 1081 1356 <TabItem value="file" label="File"> 1082 - See [`listenbrainz.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fclient.json) 1357 + 1358 + <details> 1359 + 1360 + <summary>Example</summary> 1361 + 1362 + <CodeBlock title="CONFIG_DIR/listenbrainz.json" language="json5">{ListenbrainzConfig}</CodeBlock> 1363 + 1364 + </details> 1365 + 1366 + or <SchemaLink client lower objectName="ListenBrainzClientConfig"/> 1083 1367 </TabItem> 1084 1368 <TabItem value="aio" label="AIO"> 1085 - See [`listenbrainz.json.example`](https://github.com/FoxxMD/multi-scrobbler/blob/master/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%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fclient.json) 1369 + <details> 1370 + 1371 + <summary>Example</summary> 1372 + 1373 + <AIOExample client data={ListenbrainzConfig} name="listenbrainz"/> 1374 + 1375 + </details> 1376 + 1377 + or <SchemaLink client lower objectName="ListenBrainzClientConfig"/> 1086 1378 </TabItem> 1087 1379 </Tabs> 1088 1380
+1
docsite/docusaurus.config.ts
··· 155 155 prism: { 156 156 theme: themes.themes.github, 157 157 darkTheme: themes.themes.dracula, 158 + additionalLanguages: ['json','json5','typescript'] 158 159 }, 159 160 colorMode: { 160 161 defaultMode: 'dark',
+69 -3
docsite/package-lock.json
··· 14 14 "@mdx-js/react": "^3.0.0", 15 15 "clsx": "^2.0.0", 16 16 "docusaurus-json-schema-plugin": "^1.12.1", 17 + "micromark-extension-directive": "^3.0.1", 17 18 "prism-react-renderer": "^2.3.0", 19 + "raw-loader": "^4.0.2", 18 20 "react": "^18.0.0", 19 21 "react-dom": "^18.0.0" 20 22 }, ··· 9137 9139 ] 9138 9140 }, 9139 9141 "node_modules/micromark-extension-directive": { 9140 - "version": "3.0.0", 9141 - "resolved": "https://registry.npmjs.org/micromark-extension-directive/-/micromark-extension-directive-3.0.0.tgz", 9142 - "integrity": "sha512-61OI07qpQrERc+0wEysLHMvoiO3s2R56x5u7glHq2Yqq6EHbH4dW25G9GfDdGCDYqA21KE6DWgNSzxSwHc2hSg==", 9142 + "version": "3.0.1", 9143 + "resolved": "https://registry.npmjs.org/micromark-extension-directive/-/micromark-extension-directive-3.0.1.tgz", 9144 + "integrity": "sha512-VGV2uxUzhEZmaP7NSFo2vtq7M2nUD+WfmYQD+d8i/1nHbzE+rMy9uzTvUybBbNiVbrhOZibg3gbyoARGqgDWyg==", 9143 9145 "dependencies": { 9144 9146 "devlop": "^1.0.0", 9145 9147 "micromark-factory-space": "^2.0.0", ··· 12190 12192 "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 12191 12193 "engines": { 12192 12194 "node": ">= 0.8" 12195 + } 12196 + }, 12197 + "node_modules/raw-loader": { 12198 + "version": "4.0.2", 12199 + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", 12200 + "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==", 12201 + "dependencies": { 12202 + "loader-utils": "^2.0.0", 12203 + "schema-utils": "^3.0.0" 12204 + }, 12205 + "engines": { 12206 + "node": ">= 10.13.0" 12207 + }, 12208 + "funding": { 12209 + "type": "opencollective", 12210 + "url": "https://opencollective.com/webpack" 12211 + }, 12212 + "peerDependencies": { 12213 + "webpack": "^4.0.0 || ^5.0.0" 12214 + } 12215 + }, 12216 + "node_modules/raw-loader/node_modules/ajv": { 12217 + "version": "6.12.6", 12218 + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 12219 + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 12220 + "dependencies": { 12221 + "fast-deep-equal": "^3.1.1", 12222 + "fast-json-stable-stringify": "^2.0.0", 12223 + "json-schema-traverse": "^0.4.1", 12224 + "uri-js": "^4.2.2" 12225 + }, 12226 + "funding": { 12227 + "type": "github", 12228 + "url": "https://github.com/sponsors/epoberezkin" 12229 + } 12230 + }, 12231 + "node_modules/raw-loader/node_modules/ajv-keywords": { 12232 + "version": "3.5.2", 12233 + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", 12234 + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", 12235 + "peerDependencies": { 12236 + "ajv": "^6.9.1" 12237 + } 12238 + }, 12239 + "node_modules/raw-loader/node_modules/json-schema-traverse": { 12240 + "version": "0.4.1", 12241 + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 12242 + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" 12243 + }, 12244 + "node_modules/raw-loader/node_modules/schema-utils": { 12245 + "version": "3.3.0", 12246 + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", 12247 + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", 12248 + "dependencies": { 12249 + "@types/json-schema": "^7.0.8", 12250 + "ajv": "^6.12.5", 12251 + "ajv-keywords": "^3.5.2" 12252 + }, 12253 + "engines": { 12254 + "node": ">= 10.13.0" 12255 + }, 12256 + "funding": { 12257 + "type": "opencollective", 12258 + "url": "https://opencollective.com/webpack" 12193 12259 } 12194 12260 }, 12195 12261 "node_modules/rc": {
+2
docsite/package.json
··· 20 20 "@mdx-js/react": "^3.0.0", 21 21 "clsx": "^2.0.0", 22 22 "docusaurus-json-schema-plugin": "^1.12.1", 23 + "micromark-extension-directive": "^3.0.1", 23 24 "prism-react-renderer": "^2.3.0", 25 + "raw-loader": "^4.0.2", 24 26 "react": "^18.0.0", 25 27 "react-dom": "^18.0.0" 26 28 },
+50
docsite/src/components/AIOExample.tsx
··· 1 + import React, { Fragment } from "react" 2 + import CodeBlock from '@theme/CodeBlock'; 3 + import Admonition from '@theme/Admonition'; 4 + import ErrorBoundary from "@docusaurus/ErrorBoundary" 5 + import Error from "@theme/Error" 6 + import { Simulate } from "react-dom/test-utils"; 7 + import error = Simulate.error; 8 + 9 + export interface AIOProps { 10 + data: string 11 + client?: boolean 12 + name: string 13 + } 14 + 15 + const AIOExample = (props: AIOProps) => { 16 + const { 17 + data, 18 + name, 19 + client = false 20 + } = props; 21 + 22 + let configObj; 23 + // eslint-disable-next-line prefer-const 24 + try { 25 + configObj = JSON.parse(data); 26 + } catch (e) { 27 + console.error(e); 28 + return <Admonition type="danger" title="Unexpected Error"> 29 + <p>Example component crashed because of error!</p> 30 + <CodeBlock>{e.message}</CodeBlock> 31 + </Admonition> 32 + } 33 + configObj[0].type = name; 34 + const configType = client ? 'clients' : 'sources'; 35 + 36 + const aio = {[configType]: configObj}; 37 + return <CodeBlock title="CONFIG_DIR/config.json" language="json5">{JSON.stringify(aio, null, 2)}</CodeBlock> 38 + } 39 + 40 + const WrappedAIOExample = (props: AIOProps) => { 41 + return <ErrorBoundary 42 + fallback={({error}) => ( 43 + <div> 44 + <p>Example component crashed because of error: {error.message}.</p> 45 + </div> 46 + )} 47 + ><AIOExample {...props} /></ErrorBoundary> 48 + } 49 + 50 + export default WrappedAIOExample;
+27
docsite/src/components/SchemaLink.tsx
··· 1 + import React, {PropsWithChildren, Fragment} from "react" 2 + 3 + export interface SchemaLinkProps { 4 + objectName: string 5 + lower?: boolean 6 + client?: boolean 7 + } 8 + 9 + const sourceURL = 'https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fsource.json'; 10 + const clientURL = 'https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fmaster%2Fsrc%2Fbackend%2Fcommon%2Fschema%2Fclient.json'; 11 + 12 + const SchemaLink = (props: PropsWithChildren<SchemaLinkProps>) => { 13 + const { 14 + children, 15 + lower, 16 + client = false 17 + } = props; 18 + let content = children; 19 + if(content === undefined) { 20 + content = <Fragment>{lower ? 'explore' : 'Explore'} the schema with an example and live editor/validator</Fragment> 21 + } 22 + const definition = `https://json-schema.app/view/%23/%23%2Fdefinitions%2F${props.objectName}`; 23 + const url = client ? clientURL : sourceURL; 24 + return <a target="_blank" href={`${definition}?url=${url}`}>{content}</a> 25 + } 26 + 27 + export default SchemaLink;