mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-16 02:42:34 +03:00
Motivation: The `key` tag was never populated from MP3 (TKEY), M4A
(iTunes initialkey) or FLAC (INITIALKEY) files. TagLib exposes all three
as the raw tag "initialkey", which was not among the aliases for `key`
in mappings.yaml, so the value showed up in rawTags but not in mappedTags.
Approach: Add the lowercase alias `initialkey` to the `key` entry in
resources/mappings.yaml, plus a unit test.
Validation: Added a test in model/metadata/metadata_test.go that feeds
{"initialkey": ["Ebm"]} to metadata.New and expects `key` == "Ebm". It
fails without the alias and passes with it (go test ./model/metadata/).
`go test ./model/...` passes and gofmt is clean. I did not scan real
audio files end to end; the raw tag name comes from the issue's
`navidrome inspect` output.
Report: https://github.com/navidrome/navidrome/issues/6369
Assisted-by: claude-sonnet-5-5 (via Claude Code)
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Co-authored-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>