mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 20:01:10 +00:00
Updates the technical documentation of the music library, the plugins, and the architecture decisions
This commit is contained in:
1 parent
012d702b17
commit
bf8b49653d
26 files changed
+1836
-620
No files matched your search
@@ -23,12 +23,22 @@
|
||||
- [Reorder Library Metadata Providers](#reorder-library-metadata-providers)
|
||||
- [Reorder Library Metadata Providers Request](#reorder-library-metadata-providers-request)
|
||||
- [Reorder Library Metadata Providers Response](#reorder-library-metadata-providers-response)
|
||||
- [Get Library Artwork Providers](#get-library-artwork-providers)
|
||||
- [Get Library Artwork Providers Request](#get-library-artwork-providers-request)
|
||||
- [Get Library Artwork Providers Response](#get-library-artwork-providers-response)
|
||||
- [Set Library Artwork Provider Enabled](#set-library-artwork-provider-enabled)
|
||||
- [Set Library Artwork Provider Enabled Request](#set-library-artwork-provider-enabled-request)
|
||||
- [Set Library Artwork Provider Enabled Response](#set-library-artwork-provider-enabled-response)
|
||||
- [Reorder Library Artwork Providers](#reorder-library-artwork-providers)
|
||||
- [Reorder Library Artwork Providers Request](#reorder-library-artwork-providers-request)
|
||||
- [Reorder Library Artwork Providers Response](#reorder-library-artwork-providers-response)
|
||||
- [Get Library Book Readers](#get-library-book-readers)
|
||||
- [Get Library Book Readers Request](#get-library-book-readers-request)
|
||||
- [Get Library Book Readers Response](#get-library-book-readers-response)
|
||||
- [Set Library Book Reader Enabled](#set-library-book-reader-enabled)
|
||||
- [Set Library Book Reader Enabled Request](#set-library-book-reader-enabled-request)
|
||||
- [Set Library Book Reader Enabled Response](#set-library-book-reader-enabled-response)
|
||||
- [Music Plugins](#music-plugins)
|
||||
|
||||
## Plugins
|
||||
|
||||
@@ -65,15 +75,20 @@ GET api/v1/plugins
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "f0d1a2b3-4c5d-4e6f-8a7b-9c0d1e2f3a4b",
|
||||
"name": "OpenLibrary",
|
||||
"author": "Binary Alley",
|
||||
"id": "f4c1a7de-3b52-4e6a-9d21-8c7e5b04a1f3",
|
||||
"name": "MusicBrainz Metadata",
|
||||
"author": "Lumina",
|
||||
"version": "1.0.0",
|
||||
"description": "Downloads book metadata from Open Library.",
|
||||
"description": "Retrieves artist, album and track metadata from MusicBrainz.",
|
||||
"loadStatus": "Loaded",
|
||||
"loadError": null,
|
||||
"settings": {
|
||||
"language": "en"
|
||||
"BaseUrl": "https://musicbrainz.org/ws/2/",
|
||||
"DoesAllowPrivateBaseUrl": "false",
|
||||
"ContactEmail": "",
|
||||
"SearchResultLimit": "10",
|
||||
"ReleaseLookupLimit": "25",
|
||||
"MinimumRequestIntervalSeconds": "1.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -93,28 +108,62 @@ GET api/v1/plugins/{pluginId}/settings
|
||||
200 Ok
|
||||
```
|
||||
|
||||
The `type` of a setting descriptor is one of `Text`, `Number`, `Boolean` or `Select`. A `Select` setting also carries the list of `allowedValues` it can take.
|
||||
|
||||
```json
|
||||
{
|
||||
"pluginId": "f0d1a2b3-4c5d-4e6f-8a7b-9c0d1e2f3a4b",
|
||||
"pluginId": "f4c1a7de-3b52-4e6a-9d21-8c7e5b04a1f3",
|
||||
"schema": [
|
||||
{
|
||||
"key": "language",
|
||||
"label": "Language",
|
||||
"key": "BaseUrl",
|
||||
"label": "Base URL",
|
||||
"type": "Text",
|
||||
"defaultValue": "en",
|
||||
"defaultValue": "https://musicbrainz.org/ws/2/",
|
||||
"allowedValues": null
|
||||
},
|
||||
{
|
||||
"key": "maxResults",
|
||||
"label": "Maximum results",
|
||||
"key": "DoesAllowPrivateBaseUrl",
|
||||
"label": "Allow LAN/Private Base URL",
|
||||
"type": "Boolean",
|
||||
"defaultValue": "false",
|
||||
"allowedValues": null
|
||||
},
|
||||
{
|
||||
"key": "ContactEmail",
|
||||
"label": "Contact Email",
|
||||
"type": "Text",
|
||||
"defaultValue": null,
|
||||
"allowedValues": null
|
||||
},
|
||||
{
|
||||
"key": "SearchResultLimit",
|
||||
"label": "Search Result Limit",
|
||||
"type": "Number",
|
||||
"defaultValue": "10",
|
||||
"allowedValues": null
|
||||
},
|
||||
{
|
||||
"key": "ReleaseLookupLimit",
|
||||
"label": "Release Lookup Limit",
|
||||
"type": "Number",
|
||||
"defaultValue": "25",
|
||||
"allowedValues": null
|
||||
},
|
||||
{
|
||||
"key": "MinimumRequestIntervalSeconds",
|
||||
"label": "Minimum Request Interval (seconds)",
|
||||
"type": "Number",
|
||||
"defaultValue": "1.0",
|
||||
"allowedValues": null
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"language": "en",
|
||||
"maxResults": "10"
|
||||
"BaseUrl": "https://musicbrainz.org/ws/2/",
|
||||
"DoesAllowPrivateBaseUrl": "false",
|
||||
"ContactEmail": "",
|
||||
"SearchResultLimit": "10",
|
||||
"ReleaseLookupLimit": "25",
|
||||
"MinimumRequestIntervalSeconds": "1.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -129,10 +178,10 @@ PUT api/v1/plugins/{pluginId}/settings
|
||||
|
||||
```json
|
||||
{
|
||||
"pluginId": "f0d1a2b3-4c5d-4e6f-8a7b-9c0d1e2f3a4b",
|
||||
"pluginId": "f4c1a7de-3b52-4e6a-9d21-8c7e5b04a1f3",
|
||||
"settings": {
|
||||
"language": "en",
|
||||
"maxResults": "25"
|
||||
"BaseUrl": "https://musicbrainz.org/ws/2/",
|
||||
"SearchResultLimit": "25"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -151,6 +200,8 @@ PUT api/v1/plugins/{pluginId}/settings
|
||||
GET api/v1/libraries/{libraryId}/metadata-providers
|
||||
```
|
||||
|
||||
Returns the metadata providers available for the media library, one entry per plugin that provides metadata, along with whether the provider is enabled for the media library and its rank, which determines the order in which the providers are tried.
|
||||
|
||||
#### Get Library Metadata Providers Response
|
||||
|
||||
```js
|
||||
@@ -160,8 +211,8 @@ GET api/v1/libraries/{libraryId}/metadata-providers
|
||||
```json
|
||||
[
|
||||
{
|
||||
"pluginId": "f0d1a2b3-4c5d-4e6f-8a7b-9c0d1e2f3a4b",
|
||||
"name": "OpenLibrary",
|
||||
"pluginId": "f4c1a7de-3b52-4e6a-9d21-8c7e5b04a1f3",
|
||||
"name": "MusicBrainz Metadata",
|
||||
"isEnabled": true,
|
||||
"rank": 1
|
||||
}
|
||||
@@ -179,7 +230,7 @@ PUT api/v1/libraries/{libraryId}/metadata-providers/{pluginId}/enabled
|
||||
```json
|
||||
{
|
||||
"libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
|
||||
"pluginId": "f0d1a2b3-4c5d-4e6f-8a7b-9c0d1e2f3a4b",
|
||||
"pluginId": "f4c1a7de-3b52-4e6a-9d21-8c7e5b04a1f3",
|
||||
"isEnabled": true
|
||||
}
|
||||
```
|
||||
@@ -202,7 +253,7 @@ PUT api/v1/libraries/{libraryId}/metadata-providers/reorder
|
||||
{
|
||||
"libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
|
||||
"pluginIds": [
|
||||
"f0d1a2b3-4c5d-4e6f-8a7b-9c0d1e2f3a4b",
|
||||
"f4c1a7de-3b52-4e6a-9d21-8c7e5b04a1f3",
|
||||
"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
|
||||
]
|
||||
}
|
||||
@@ -214,6 +265,85 @@ PUT api/v1/libraries/{libraryId}/metadata-providers/reorder
|
||||
200 Ok
|
||||
```
|
||||
|
||||
### Get Library Artwork Providers
|
||||
|
||||
#### Get Library Artwork Providers Request
|
||||
|
||||
```js
|
||||
GET api/v1/libraries/{libraryId}/artwork-providers
|
||||
```
|
||||
|
||||
Returns the artwork providers available for the media library, one entry per plugin that provides artwork, along with whether the provider is enabled for the media library and its rank, which determines the order in which the providers are tried when resolving the artwork.
|
||||
|
||||
#### Get Library Artwork Providers Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"pluginId": "c9f1a7d3-2b64-4e18-8f05-7a3d9c1b6e42",
|
||||
"name": "Local Music Artwork",
|
||||
"isEnabled": true,
|
||||
"rank": 1
|
||||
},
|
||||
{
|
||||
"pluginId": "b7e4c2a9-1f38-4d65-9a02-3e6b8f5c7d14",
|
||||
"name": "Cover Art Archive",
|
||||
"isEnabled": true,
|
||||
"rank": 2
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Set Library Artwork Provider Enabled
|
||||
|
||||
#### Set Library Artwork Provider Enabled Request
|
||||
|
||||
```js
|
||||
PUT api/v1/libraries/{libraryId}/artwork-providers/{pluginId}/enabled
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
|
||||
"pluginId": "b7e4c2a9-1f38-4d65-9a02-3e6b8f5c7d14",
|
||||
"isEnabled": true
|
||||
}
|
||||
```
|
||||
|
||||
#### Set Library Artwork Provider Enabled Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
### Reorder Library Artwork Providers
|
||||
|
||||
#### Reorder Library Artwork Providers Request
|
||||
|
||||
```js
|
||||
PUT api/v1/libraries/{libraryId}/artwork-providers/reorder
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
|
||||
"pluginIds": [
|
||||
"c9f1a7d3-2b64-4e18-8f05-7a3d9c1b6e42",
|
||||
"b7e4c2a9-1f38-4d65-9a02-3e6b8f5c7d14"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### Reorder Library Artwork Providers Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
### Get Library Book Readers
|
||||
|
||||
#### Get Library Book Readers Request
|
||||
@@ -272,3 +402,16 @@ PUT api/v1/libraries/{libraryId}/book-readers/{pluginId}/enabled
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
## Music Plugins
|
||||
|
||||
The music media library type is served by four plugins, which register their capabilities through `IPluginServiceRegistrator`. A single plugin can expose more than one capability, and the capabilities are enabled and ranked per media library through the endpoints above.
|
||||
|
||||
| Plugin | Capability | Web access | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `MusicBrainz Metadata` | Metadata provider (artist, album, track) | Yes | Retrieves artist, album and track metadata from MusicBrainz. |
|
||||
| `ID3 Metadata` | Metadata provider (artist, album, track) | No | Populates artist, album and track metadata from the embedded tags of the audio files. |
|
||||
| `Local Music Artwork` | Artwork provider (artist, album) | No | Reads the artwork of the artists and the albums from the images stored in the folders of a local music library, and can extract the embedded album cover from the audio files. |
|
||||
| `Cover Art Archive` | Artwork provider (album) | Yes | Retrieves the cover, back, booklet, medium and other artwork of music albums from the Cover Art Archive. |
|
||||
|
||||
The metadata providers are resolved during the metadata enrichment phase of a scan, and the artwork providers during the artwork enrichment phase, in the order given by their rank.
|
||||
Reference in new issue
Block a user