Merge branch 'master' into songs-under-30s-dont-scrobble-on-lastfm/5986

This commit is contained in:
Timo 2026-08-21 10:52:45 +02:00 committed by GitHub
commit 175e23bea7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 17 additions and 0 deletions

View File

@ -174,6 +174,14 @@ Capabilities define what your plugin can do. They're automatically detected base
Provides artist and album metadata. All methods are **optional** — implement only the ones your data source supports.
> **Returning "not found".** When you have no data for an item, return an empty response and no
> error. In the Go PDK that is `return nil, nil`. Navidrome reads it as a definitive "not found"
> and stops asking.
>
> Return an error only when the plugin itself failed, such as an unreachable API or a broken host
> call. Navidrome retries failed calls with backoff. A plugin that errors on "no data" makes
> Navidrome retry every item it has no data for.
| Function | Input | Output | Description |
|-----------------------------------|----------------------------|----------------------------------|--------------------------|
| `nd_get_artist_mbid` | `{id, name}` | `{mbid}` | Get MusicBrainz ID |

View File

@ -9,6 +9,9 @@ import "github.com/navidrome/navidrome/plugins/types"
// Plugins implementing this capability can choose which methods to implement.
// Each method is optional - plugins only need to provide the functionality they support.
//
// To say "no data for this item", return a nil response and a nil error. Return an error only when
// the plugin itself failed, because Navidrome retries failed calls with backoff.
//
//nd:capability name=metadata
type MetadataAgent interface {
// GetArtistMBID retrieves the MusicBrainz ID for an artist.

View File

@ -186,6 +186,9 @@ type TopSongsResponse struct {
//
// Plugins implementing this capability can choose which methods to implement.
// Each method is optional - plugins only need to provide the functionality they support.
//
// To say "no data for this item", return a nil response and a nil error. Return an error only when
// the plugin itself failed, because Navidrome retries failed calls with backoff.
type Metadata interface{}
// ArtistMBIDProvider provides the GetArtistMBID function.

View File

@ -184,6 +184,9 @@ type TopSongsResponse struct {
//
// Plugins implementing this capability can choose which methods to implement.
// Each method is optional - plugins only need to provide the functionality they support.
//
// To say "no data for this item", return a nil response and a nil error. Return an error only when
// the plugin itself failed, because Navidrome retries failed calls with backoff.
type Metadata interface{}
// ArtistMBIDProvider provides the GetArtistMBID function.