Files
navidrome/model
Pujitha PaladuguandPujitha Paladugu c9c70c952b fix(scanner): map TagLib's normalized "initialkey" tag to the key tag (#6384)
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>
2026-11-02 21:54:46 -05:00
..
2020-10-21 21:44:03 -04:00