Unlock Music Project https://git.unlock-music.dev/
Go to file
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
.gitea/workflows ci: allow manual trigger of build job 2025-05-09 05:03:00 +09:00
algo fix(ncm): Handle mixed-type artist field in metadata parsing 2025-08-09 23:58:03 +00:00
cmd/um chore: mark default version as "custom" 2025-05-07 09:27:34 +09:00
internal fix #78: skip parsing cover art if image is unsupported 2024-11-02 13:49:40 +09:00
misc ci: make zip work 2025-05-09 11:21:22 +09:00
.gitignore ci: fix archive name and zip package 2025-05-09 05:00:21 +09:00
go.mod feat: first version of kgg support 2025-05-07 08:12:57 +09:00
go.sum feat: first version of kgg support 2025-05-07 08:12:57 +09:00
LICENSE LICENSE: Say Hello to 2021! 2021-02-22 00:05:37 +08:00
README.md docs: update reference to gitea actions 2025-05-08 07:11:55 +09: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