mirror of
https://github.com/navidrome/navidrome.git
synced 2026-03-04 06:35:52 +00:00
* feat(plugins): add lyrics provider plugin capability Refactor the lyrics system from a static function to an interface-based service that supports WASM plugin providers. Plugins listed in the LyricsPriority config (alongside "embedded" and file extensions) are now resolved through the plugin system. Includes capability definition, Go/Rust PDK, adapter, Wire integration, and tests for plugin fallback behavior. * test(plugins): add lyrics capability integration test with test plugin * fix(plugins): default lyrics language to 'xxx' when plugin omits it Per the OpenSubsonic spec, the server must return 'und' or 'xxx' when the lyrics language is unknown. The lyrics plugin adapter was passing an empty string through when a plugin didn't provide a language value. This defaults the language to 'xxx', consistent with all other callers of model.ToLyrics() in the codebase. * refactor(plugins): rename lyrics import to improve clarity Signed-off-by: Deluan <deluan@navidrome.org> * refactor(lyrics): update TrackInfo description for clarity Signed-off-by: Deluan <deluan@navidrome.org> * fix(lyrics): enhance lyrics plugin handling and case sensitivity Signed-off-by: Deluan <deluan@navidrome.org> * fix(plugins): update payload type to string with byte format for task data Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org>
142 lines
5.6 KiB
YAML
142 lines
5.6 KiB
YAML
version: v1-draft
|
|
exports:
|
|
nd_scrobbler_is_authorized:
|
|
description: IsAuthorized checks if a user is authorized to scrobble to this service.
|
|
input:
|
|
$ref: '#/components/schemas/IsAuthorizedRequest'
|
|
contentType: application/json
|
|
output:
|
|
type: boolean
|
|
contentType: application/json
|
|
nd_scrobbler_now_playing:
|
|
description: NowPlaying sends a now playing notification to the scrobbling service.
|
|
input:
|
|
$ref: '#/components/schemas/NowPlayingRequest'
|
|
contentType: application/json
|
|
nd_scrobbler_scrobble:
|
|
description: Scrobble submits a completed scrobble to the scrobbling service.
|
|
input:
|
|
$ref: '#/components/schemas/ScrobbleRequest'
|
|
contentType: application/json
|
|
components:
|
|
schemas:
|
|
ArtistRef:
|
|
description: ArtistRef is a reference to an artist with name and optional MBID.
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: ID is the internal Navidrome artist ID (if known).
|
|
name:
|
|
type: string
|
|
description: Name is the artist name.
|
|
mbid:
|
|
type: string
|
|
description: MBID is the MusicBrainz ID for the artist.
|
|
required:
|
|
- name
|
|
IsAuthorizedRequest:
|
|
description: IsAuthorizedRequest is the request for authorization check.
|
|
properties:
|
|
username:
|
|
type: string
|
|
description: Username is the username of the user.
|
|
required:
|
|
- username
|
|
NowPlayingRequest:
|
|
description: NowPlayingRequest is the request for now playing notification.
|
|
properties:
|
|
username:
|
|
type: string
|
|
description: Username is the username of the user.
|
|
track:
|
|
$ref: '#/components/schemas/TrackInfo'
|
|
description: Track is the track currently playing.
|
|
position:
|
|
type: integer
|
|
format: int32
|
|
description: Position is the current playback position in seconds.
|
|
required:
|
|
- username
|
|
- track
|
|
- position
|
|
ScrobbleRequest:
|
|
description: ScrobbleRequest is the request for submitting a scrobble.
|
|
properties:
|
|
username:
|
|
type: string
|
|
description: Username is the username of the user.
|
|
track:
|
|
$ref: '#/components/schemas/TrackInfo'
|
|
description: Track is the track that was played.
|
|
timestamp:
|
|
type: integer
|
|
format: int64
|
|
description: Timestamp is the Unix timestamp when the track started playing.
|
|
required:
|
|
- username
|
|
- track
|
|
- timestamp
|
|
TrackInfo:
|
|
description: TrackInfo contains track metadata.
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: ID is the internal Navidrome track ID.
|
|
title:
|
|
type: string
|
|
description: Title is the track title.
|
|
album:
|
|
type: string
|
|
description: Album is the album name.
|
|
artist:
|
|
type: string
|
|
description: Artist is the formatted artist name for display (e.g., "Artist1 • Artist2").
|
|
albumArtist:
|
|
type: string
|
|
description: AlbumArtist is the formatted album artist name for display.
|
|
artists:
|
|
type: array
|
|
description: Artists is the list of track artists.
|
|
items:
|
|
$ref: '#/components/schemas/ArtistRef'
|
|
albumArtists:
|
|
type: array
|
|
description: AlbumArtists is the list of album artists.
|
|
items:
|
|
$ref: '#/components/schemas/ArtistRef'
|
|
duration:
|
|
type: number
|
|
format: float
|
|
description: Duration is the track duration in seconds.
|
|
trackNumber:
|
|
type: integer
|
|
format: int32
|
|
description: TrackNumber is the track number on the album.
|
|
discNumber:
|
|
type: integer
|
|
format: int32
|
|
description: DiscNumber is the disc number.
|
|
mbzRecordingId:
|
|
type: string
|
|
description: MBZRecordingID is the MusicBrainz recording ID.
|
|
mbzAlbumId:
|
|
type: string
|
|
description: MBZAlbumID is the MusicBrainz album/release ID.
|
|
mbzReleaseGroupId:
|
|
type: string
|
|
description: MBZReleaseGroupID is the MusicBrainz release group ID.
|
|
mbzReleaseTrackId:
|
|
type: string
|
|
description: MBZReleaseTrackID is the MusicBrainz release track ID.
|
|
required:
|
|
- id
|
|
- title
|
|
- album
|
|
- artist
|
|
- albumArtist
|
|
- artists
|
|
- albumArtists
|
|
- duration
|
|
- trackNumber
|
|
- discNumber
|