solitudechn 20b746bee5 fix(ncm): Handle mixed-type artist field in metadata parsing
The current implementation for parsing artist metadata in `ncmMetaMusic.GetArtists` does not handle cases where the "artist" JSON field is a list containing mixed-type inner lists.

For certain NCM files (often those with FLAC format), the artist data is structured as `[["Artist Name", 12345]]`. The existing type assertion for `[][]string` fails for this structure because the inner slice is of type `[]interface{}`, not `[]string`. This results in the artist metadata being dropped during the conversion process.

This commit enhances the `GetArtists` method by adding a new case to the `type switch` to specifically handle the `[]interface{}` type. The new logic iterates through the nested structure and correctly extracts the artist name, which is assumed to be the first string element in each inner slice.

This fix improves compatibility with a wider range of NCM files and ensures artist metadata is reliably parsed, preventing data loss for affected files.
2025-08-09 23:58:03 +00:00
2025-05-09 11:21:22 +09:00
2025-05-07 08:12:57 +09:00
2025-05-07 08:12:57 +09:00
2021-02-22 00:05:37 +08:00

Unlock Music Project - CLI Edition

Original: Web Edition https://git.unlock-music.dev/um/web

Warning

在本站 fork 不会起到备份的作用,只会浪费服务器储存空间。如无必要请勿 fork 该仓库。

Features

  • All Algorithm Supported By unlock-music/web
  • Complete Metadata & Cover Image

Release

Latest release.

Install from source

  • Requirements: Golang 1.23.3
  1. run go install unlock-music.dev/cli/cmd/um@master

Build from repo source

  1. Pull repo source.
  2. Build with go build ./cmd/um.

It will produce um or um.exe (Windows).

How to use

  • Drag the encrypted file to um.exe (Tested on Windows)
  • Run: ./um [-o <output dir>] [-i] <input dir/file>
  • Use ./um -h to show help menu
Description
Unlock Music Project - CLI Edition
Readme 1.2 MiB
Languages
Go 99.4%
Shell 0.6%