navidrome/tests/fixtures
Yuuta 3a14faa033
feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076)
Expand backend lyrics support with richer sidecar formats and upgrade the
OpenSubsonic songLyrics implementation to the version 2 structured karaoke
contract, while preserving version 1 behavior by default.

Sidecar formats and parsing:
- Add a TTML parser (core/lyrics/ttml.go): clock time, offset time, bare
  decimal seconds, nested timing contexts, and token-level <span> timing for
  word/syllable karaoke. Parses Apple Music-style metadata tracks (translation
  and pronunciation/transliteration) and agent metadata into per-track agents[]
  plus per-cue-line agentId. Hydrates missing line timing from cue timing.
- Add an SRT parser (core/lyrics/srt.go).
- Add a LRCLIB Lyricsfile (.yaml/.yml) parser (model/lyricsfile.go): maps
  per-word lines[].words[] to cues with inclusive UTF-8 byte offsets and
  attributes overlapping lines to synthetic voice agents so parallel vocals
  split correctly in the enhanced response.
- Extend LRC parsing for Enhanced LRC inline <mm:ss.xx> word-timing markers.
- Add UTF-8 BOM and UTF-16 LE support for TTML/LRC sidecars.
- Parse the above formats from embedded tags as well as sidecar files.

Source resolution:
- Default lyricspriority is now
  ".ttml,.yaml,.yml,.elrc,.lrc,.srt,.txt,embedded" so the new formats are
  discoverable without manual configuration.
- Preserve configured source priority across duplicate media-file candidates
  instead of only checking the first DB match, so higher-priority sidecar
  lyrics on older duplicates can still win.
- Raise the embedded-lyrics tag maxLength to 1 MB to fit word-timed
  TTML/Enhanced-LRC karaoke for a full song.

OpenSubsonic songLyrics v2:
- Advertise songLyrics versions [1, 2].
- With enhanced=true, getLyricsBySongId may return structuredLyrics.kind
  (main/translation/pronunciation), cueLine[] line-level karaoke groupings,
  cueLine.cue[] timed words/syllables with required UTF-8 byteStart/byteEnd,
  reusable structuredLyrics.agents[], and cueLine.agentId references.
- Without enhanced=true, the response stays v1-compatible: no kind, no cueLine,
  no agents, no non-main tracks; the existing line[] payload is always
  populated so legacy clients keep working.

Contract details:
- cueLine is emitted only for synced lyrics with cue data.
- Within a cueLine, cue.end is normalized all-or-none and overlaps are removed;
  overlaps across separate cueLines remain valid for parallel vocal layers.
- Missing cue end-times are filled from the next cue or the parent line.
- When cueLines share an index, the one whose agent has role "main" is first.
- LyricCue.Value is serialized as XML chardata; cues with nil start are skipped
  rather than serialized as 0.

Refactoring:
- Move pure format parsers into model/ (lyrics.go, lyrics_ttml.go,
  lyrics_srt.go, lyrics_embedded.go, lyricsfile.go) and extract Subsonic
  response building into server/subsonic/lyrics.go.
- Centralize lyric-kind constants and add Lyrics.EffectiveKind/IsMainKind.
- Add gg.Clone helper.

Spec references:
  https://github.com/opensubsonic/open-subsonic-api/discussions/213
  https://github.com/opensubsonic/open-subsonic-api/pull/218 (songLyrics v2)
  https://github.com/opensubsonic/open-subsonic-api/pull/228 (cue byte offsets)
2026-06-19 12:00:58 -04:00
..
#snapshot Fix pipeline 2024-09-13 17:43:50 -04:00
$Recycle.Bin Fix pipeline. 2023-03-09 22:25:56 -05:00
...unhidden_folder Improve scanner (#1054) 2021-04-28 19:51:02 -04:00
.hidden_folder Fix ignoring hidden folders when scanning 2020-10-22 13:59:54 -04:00
artist Implement artist art priority (#2266) 2023-03-30 18:28:05 -04:00
empty_folder Move test file to fixtures folder 2020-04-28 11:59:47 -04:00
ignored_folder Skip scanning folders if they contain a .ndignore file. Closes #297 2020-05-18 14:37:01 -04:00
invalid-files Add OS Lyrics extension (#2656) 2023-12-27 20:20:29 -05:00
playlists feat(playlist): support #EXTALBUMARTURL directive and sidecar images (#5131) 2026-03-02 11:39:59 -05:00
symlink_chain fix(scanner): resolve symlinks to their target when classifying files 2026-06-18 15:48:29 -04:00
._02 Invisible.mp3 Ignore "hidden" files when importing a folder 2020-08-21 11:50:18 -04:00
01 Invisible (RED) Edit Version.m4a fix(scanner): map ORIGYEAR tag for VorbisComment and MP4 formats 2026-04-06 21:35:22 -04:00
01 Invisible (RED) Edit Version.mp3 getCoverArt.view working 2016-03-03 12:08:44 -05:00
bom-test.lrc fix: handle UTF BOM in lyrics and playlist files (#4637) 2025-10-31 09:07:23 -04:00
bom-test.ttml feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
bom-utf16-test.lrc fix: handle UTF BOM in lyrics and playlist files (#4637) 2025-10-31 09:07:23 -04:00
bom-utf16-test.ttml feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
deezer.artist.bio.empty.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
deezer.artist.bio.en.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
deezer.artist.bio.fr.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
deezer.artist.related.json feat(deezer): Add artist bio, top tracks, related artists and language support (#4720) 2025-11-21 15:09:24 -05:00
deezer.artist.top.json feat(deezer): Add artist bio, top tracks, related artists and language support (#4720) 2025-11-21 15:09:24 -05:00
deezer.search.artist.json feat(agents): Add Deezer API artist image provider agent (#4180) 2025-06-28 17:50:06 -04:00
empty.txt fix(scanner): improve M3U playlist import times (#2706) 2024-09-18 20:12:12 -04:00
index.html Fix background images when BaseURL is specified 2022-11-29 14:48:05 -05:00
itunes-library.xml Retrofitting with tests 2016-02-29 10:04:30 -05:00
lastfm.album.getinfo.empty.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
lastfm.album.getinfo.empty_urls.json Get album info (when available) from Last.fm, add getAlbumInfo endpoint (#2061) 2023-01-17 20:22:54 -05:00
lastfm.album.getinfo.en.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
lastfm.album.getinfo.json Get album info (when available) from Last.fm, add getAlbumInfo endpoint (#2061) 2023-01-17 20:22:54 -05:00
lastfm.artist.getinfo.empty.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
lastfm.artist.getinfo.en.json feat(agents): support multiple languages for Last.fm and Deezer metadata (#4952) 2026-01-29 13:05:51 -05:00
lastfm.artist.getinfo.json Add initial last.fm client implementation 2020-10-20 16:07:31 -04:00
lastfm.artist.getinfo.unknown.json Retry calls to Last.FM without MBIDs when if returns artist invalid (#1138) 2021-05-27 20:53:24 -04:00
lastfm.artist.getsimilar.json Add dedicated SimilarArtists call 2020-10-20 16:07:31 -04:00
lastfm.artist.getsimilar.unknown.json Retry calls to Last.FM without MBIDs when if returns artist invalid (#1138) 2021-05-27 20:53:24 -04:00
lastfm.artist.gettoptracks.json Add "real" TopSongs 2020-10-20 22:53:52 -04:00
lastfm.artist.gettoptracks.unknown.json Retry calls to Last.FM without MBIDs when if returns artist invalid (#1138) 2021-05-27 20:53:24 -04:00
lastfm.artist.page.html fix(lastfm): ignore artist placeholder image. 2025-11-19 20:49:29 -05:00
lastfm.artist.page.ignored.html fix(lastfm): ignore artist placeholder image. 2025-11-19 20:49:29 -05:00
lastfm.artist.page.no_meta.html fix(lastfm): ignore artist placeholder image. 2025-11-19 20:49:29 -05:00
lastfm.track.getsimilar.json feat: add similar songs functionality in agents, and Instant Mix (song-based) to UI (#4919) 2026-01-25 16:16:43 -05:00
lastfm.track.getsimilar.unknown.json feat: add similar songs functionality in agents, and Instant Mix (song-based) to UI (#4919) 2026-01-25 16:16:43 -05:00
listenbrainz.artist.metadata.homepage.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.artist.metadata.no_homepage.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.labs.similar-artists.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.labs.similar-recordings-real-out-of-order.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.labs.similar-recordings.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.nowplaying.request.json feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
listenbrainz.popularity.json feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
listenbrainz.scrobble.request.json feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
mixed-lyrics.flac fix(scanner): lyrics tag parsing to properly handle both ID3 and aliased tags 2025-07-09 00:27:40 -03:00
no_replaygain.mp3 fix: Allow nullable ReplayGain and support 0.0 (#4239) 2025-06-17 12:02:25 -04:00
robots.txt Rename manifest.json to manifest.webmanifest (#1399) 2021-10-12 20:06:09 -04:00
spotify.search.artist.json Add initial spotify client implementation 2020-10-20 16:07:31 -04:00
symlink Follow symlinks to directories when scanning 2020-04-23 20:31:44 -04:00
symlink2dir WIP 2020-10-29 23:19:26 -04:00
test-enhanced.lrc feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
test-instrumental.yaml feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
test-metadata.ttml feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
test-overlapping.yaml feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
test-words.yaml feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
test.aiff fix(scanner): map ORIGYEAR tag for VorbisComment and MP4 formats 2026-04-06 21:35:22 -04:00
test.elrc feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
test.flac fix(scanner): map ORIGYEAR tag for VorbisComment and MP4 formats 2026-04-06 21:35:22 -04:00
test.lrc feat:(server): support reading lyrics from filesystem (#2897) 2025-04-30 08:10:19 -04:00
test.m4a fix(scanner): map ORIGYEAR tag for VorbisComment and MP4 formats 2026-04-06 21:35:22 -04:00
test.mp3 fix(scanner): map ORIGYEAR tag for VorbisComment and MP4 formats 2026-04-06 21:35:22 -04:00
test.ogg fix(scanner): map ORIGYEAR tag for VorbisComment and MP4 formats 2026-04-06 21:35:22 -04:00
test.opus fix(scanner): map ORIGYEAR tag for VorbisComment and MP4 formats 2026-04-06 21:35:22 -04:00
test.srt feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
test.tak feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
test.ttml feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
test.txt feat:(server): support reading lyrics from filesystem (#2897) 2025-04-30 08:10:19 -04:00
test.wav fix(scanner): map ORIGYEAR tag for VorbisComment and MP4 formats 2026-04-06 21:35:22 -04:00
test.wma fix(scanner): map ORIGYEAR tag for VorbisComment and MP4 formats 2026-04-06 21:35:22 -04:00
test.wv fix(scanner): map ORIGYEAR tag for VorbisComment and MP4 formats 2026-04-06 21:35:22 -04:00
test.yaml feat(subsonic): add structured sidecar lyrics support with OpenSubsonic v2 karaoke cues and agent layers (#5076) 2026-06-19 12:00:58 -04:00
zero_replaygain.mp3 fix: Allow nullable ReplayGain and support 0.0 (#4239) 2025-06-17 12:02:25 -04:00