mirror of
https://github.com/taurusxin/ncmdump.git
synced 2025-07-14 05:22:10 +08:00
Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a2d65257da | ||
![]() |
80a607a8fb | ||
![]() |
6c125d6152 | ||
![]() |
3fe1518325 | ||
![]() |
ae45748724 | ||
![]() |
a23503c3cc | ||
![]() |
95bcc209f3 | ||
![]() |
245e46a2a0 | ||
![]() |
13ca3e81d1 | ||
![]() |
e29fdaf850 | ||
![]() |
b812fe4e30 | ||
![]() |
8c4ec2ab0a | ||
![]() |
22768594ba | ||
![]() |
6af854b376 | ||
![]() |
ed6c05b4bf | ||
![]() |
dc2830d5c3 |
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,35 +0,0 @@
|
||||
---
|
||||
name: "[请按照此模板填写] 报告 Bug"
|
||||
about: "创建一个 Bug 报告,不按照模板的 Issue 会被关闭。"
|
||||
title: "[Bug] 总结你的 Bug 报告"
|
||||
labels: bug
|
||||
assignees: taurusxin
|
||||
---
|
||||
|
||||
**Bug 描述**
|
||||
清晰地描述一下 Bug 的大致问题。
|
||||
|
||||
**复现方法**
|
||||
|
||||
复现此 Bug 的方法
|
||||
|
||||
1. 打开 '...'
|
||||
2. 点击 '....'
|
||||
3. 发生报错
|
||||
|
||||
**预期行为**
|
||||
|
||||
解释一下原本应该出现的结果。
|
||||
|
||||
**屏幕截图**
|
||||
|
||||
如果可以,屏幕截图可以更好地阐述你的问题。
|
||||
|
||||
**环境**
|
||||
|
||||
- OS: [e.g. Windows 11]
|
||||
- 软件版本: [e.g. 1.3.2]
|
||||
|
||||
**附加内容**
|
||||
|
||||
添加更多其他内容以帮助开发者更好地了解这个 Bug。
|
101
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
101
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
name: 报告 Bug
|
||||
description: 创建一个 Bug 报告。
|
||||
title: "[Bug]: "
|
||||
labels: "bug"
|
||||
assignees:
|
||||
- taurusxin
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
# taurusxin/ncmdump Bug 反馈须知
|
||||
请__严格遵守该模板进行 Bug 反馈__,否则维护者有权直接关闭本 Issue 不予回复!
|
||||
为了保证 Bug 追踪的顺利,请__务必提供详细信息,并接受来自维护者的提问__!
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: 该 Bug 是否针对 `libncmdump`?
|
||||
description: 如果是命令行工具 `ncmdump` 请不要勾选。
|
||||
options:
|
||||
- label: 是的,此 Bug 是针对动态库 `libncmdump` 而不是命令行工具 `ncmdump`!
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: 类型
|
||||
options:
|
||||
- 无法转换文件
|
||||
- 转换成功但音频文件无法播放
|
||||
- 功能失效
|
||||
- 程序崩溃
|
||||
- 其他
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Bug 描述
|
||||
description: 清晰地描述一下 Bug 的大致问题及表现,对上面的类型进行补充说明。
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: 复现方法
|
||||
description: 复现此 Bug 的方法。
|
||||
placeholder: |
|
||||
1. 使用本项目处理文件 '...'
|
||||
2. 发生报错
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: 屏幕截图或视频
|
||||
description: 如果可以,屏幕截图可以更好地阐述你的问题。
|
||||
placeholder: 将截图或视频文件拖入此处
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: 操作系统
|
||||
description: 请提供您当前正在使用的操作系统,如果可以,请提供更多关于操作系统的版本信息,Linux 请提供发行版名称。
|
||||
placeholder: 如:Windows / macOS / Debian
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: ncmdump 版本
|
||||
description: 请提供您正在使用的 ncmdump 版本,如果是来自 Github Actions 的构建,请提供 commit 信息。
|
||||
placeholder: 如:1.5.0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: 网易云版本(重要)
|
||||
description: 请提供您下载 ncm 文件的网易云客户端及版本,请写明客户端平台与版本号。
|
||||
placeholder: 如:Windows 版 3.0.1
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: 所下载的音质
|
||||
options:
|
||||
- 标准
|
||||
- 极高
|
||||
- 无损
|
||||
- 高清臻音
|
||||
- 超清母带
|
||||
- 沉浸环绕声
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: 附加内容
|
||||
placeholder: 如果遇到无法转换的问题,请将样本附加到这里,便于分析。
|
||||
validations:
|
||||
required: false
|
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 寻求帮助
|
||||
url: https://github.com/taurusxin/ncmdump/discussions/categories/q-a
|
||||
about: 有疑问?请转移到讨论的 Q&A 分区!
|
||||
- name: 意见与新功能请求
|
||||
url: https://github.com/taurusxin/ncmdump/discussions/categories/ideas
|
||||
about: 需要什么新功能?请到讨论的 Ideas 分区!
|
2
.github/workflows/autobuild.yml
vendored
2
.github/workflows/autobuild.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: CI
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
BUILD_TYPE: MinSizeRel
|
||||
BUILD_PATH: build
|
||||
on:
|
||||
push:
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,3 +5,5 @@ ncmdump
|
||||
.idea
|
||||
|
||||
build
|
||||
|
||||
cmake-build-*
|
28
README.md
28
README.md
@ -6,29 +6,19 @@
|
||||
|
||||
该版本为最早的 C++ 版本,也是作者开发的市面上第一个支持 ncm 转换的程序
|
||||
|
||||
源码复刻自 anonymous5l/ncmdump,感谢前辈的付出!做了 Windows 下的移植,修复了一些编译问题
|
||||
源码复刻自 anonymous5l/ncmdump (2021年10月6日,原作者已经删库)
|
||||
|
||||
1.3.0 版本更新说明:因为之前有小伙伴反馈无法解密带有特殊字符的文件名,例如中文、日文、韩文或者是表情符号等,在1.3.0以及之后的版本彻底修复了这个问题,所有的 UTF-8 字符都可以正常解密。并且还自带了 dll 的构建,可以供其他应用程序(C#、Python、Java等)调用。
|
||||
感谢前辈的付出!此版本做了全操作系统下的的跨平台编译移植,修复了一些内存溢出的问题。
|
||||
|
||||
## 传送门
|
||||
|
||||
2021年10月6日,原作者已经删库
|
||||
1.3.0 版本更新说明:因为之前有较多 Issue 反馈无法解密带有特殊字符的文件名,例如中文、日文、韩文或者是表情符号等,在1.3.0以及之后的版本彻底修复了这个问题,所有的 UTF-8 字符都可以正常解密。并且还自带了 dll 的构建,可以供其他应用程序(C#、Python、Java等)调用。
|
||||
|
||||
## 使用
|
||||
|
||||
注意:自网易云音乐 3.0 版本开始,下载的 ncm 文件均不内置歌曲专辑的封面图片,需要从网络获取,介于在一个小工具中嵌入庞大网络库的非必要性,可以移步我的另一个仓库(<https://git.taurusxin.com/taurusxin/ncmdump-go>),下载完全使用 Golang 重写的新版本,支持从网络自动获取封面图并嵌入到目标音乐文件。
|
||||
注意:网易云音乐 3.0 之后的某些版本,下载的 ncm 文件会出现不内置歌曲专辑的封面图片的情况,所需的封面图数据需要从网络获取,介于在一个小工具中嵌入庞大网络库的非必要性,可以移步我的另一个仓库 [ncmdump-go](https://git.taurusxin.com/taurusxin/ncmdump-go) 或者使用基于此项目开发的可视化 GUI 程序 [ncmdump-gui](https://git.taurusxin.com/taurusxin/ncmdump-gui),其中后者基于前者,均完全使用 Golang 重写,并支持自动从元数据读取封面信息后从网络获取封面图并嵌入到目标音乐文件。
|
||||
|
||||
### 命令行工具
|
||||
|
||||
**[不推荐]** 你可以使用 Homebrew 来安装 Linux 或者 macOS 下的 ncmdump
|
||||
|
||||
注意:由于本项目依赖的库 taglib 的 2.0 版本尚未发布到 homebrew-core(主要是因为 taglib 2.0 导致其他 brew 包存在版本兼容问题),目前的 cmake 构建链无法在 macOS 上正常使用。根据 brew 的要求,如果依赖库已有官方的 brew 包,构建时必须使用官方仓库中的包,不能从 git 获取。而 taglib 2.0 版本开始才支持 cmake 构建。因此,ncmdump 在 homebrew 上只能发布到 `1.2.1` 版本。建议直接通过二进制方式安装,`1.3.0` 后版本修复了许多 bug,使用体验会更好。
|
||||
|
||||
```shell
|
||||
brew install ncmdump
|
||||
```
|
||||
|
||||
或者从 [Release](https://github.com/taurusxin/ncmdump/releases) 下载最新版本的对应系统的已编译好的二进制文件
|
||||
从 [Release](https://github.com/taurusxin/ncmdump/releases) 下载最新版本的对应系统的已编译好的二进制文件
|
||||
|
||||
使用 `-h` 或 `--help` 参数来打印帮助
|
||||
|
||||
@ -48,19 +38,19 @@ ncmdump -v
|
||||
ncmdump 1.ncm 2.ncm...
|
||||
```
|
||||
|
||||
你可以使用 `-d` 参数来指定一个文件夹,对文件夹下的所有以 ncm 为扩展名的文件进行批量处理
|
||||
使用 `-d` 参数来指定一个文件夹,对文件夹下的所有以 ncm 为扩展名的文件进行批量处理
|
||||
|
||||
```shell
|
||||
ncmdump -d source_dir
|
||||
```
|
||||
|
||||
你可以使用 `-r` 配合 `-d` 参数来递归处理文件夹下的所有以 ncm 为扩展名的文件
|
||||
使用 `-r` 配合 `-d` 参数来递归处理文件夹下的所有以 ncm 为扩展名的文件
|
||||
|
||||
```shell
|
||||
ncmdump -d source_dir -r
|
||||
```
|
||||
|
||||
你可以使用 `-o` 参数来指定输出目录,将转换后的文件输出到指定目录,该参数支持与 `-r` 参数一起使用
|
||||
使用 `-o` 参数来指定输出目录,将转换后的文件输出到指定目录,该参数支持与 `-r` 参数一起使用
|
||||
|
||||
```shell
|
||||
# 处理单个或多个文件并输出到指定目录
|
||||
@ -123,6 +113,8 @@ cmake --build build -j 8
|
||||
|
||||
你可以在 `build` 文件夹下找到编译好的二进制文件,以及一个可供其它项目使用的动态库(Windows Only),使用方法见仓库的 `example` 文件夹
|
||||
|
||||
[]( https://dartnode.com "Powered by DartNode - Free VPS for Open Source")
|
||||
|
||||
## Star History
|
||||
|
||||
[](https://star-history.com/#taurusxin/ncmdump&Date)
|
||||
|
@ -47,7 +47,7 @@ private:
|
||||
NcmFormat mFormat;
|
||||
std::string mImageData;
|
||||
std::ifstream mFile;
|
||||
unsigned char mKeyBox[256];
|
||||
unsigned char mKeyBox[256]{};
|
||||
NeteaseMusicMetadata* mMetaData;
|
||||
|
||||
private:
|
||||
|
@ -224,7 +224,7 @@ void NeteaseCrypt::FixMetadata()
|
||||
audioFile = new TagLib::MPEG::File(mDumpFilepath.c_str());
|
||||
tag = dynamic_cast<TagLib::MPEG::File *>(audioFile)->ID3v2Tag(true);
|
||||
|
||||
if (mImageData.length() > 0)
|
||||
if (!mImageData.empty())
|
||||
{
|
||||
TagLib::ID3v2::AttachedPictureFrame *frame = new TagLib::ID3v2::AttachedPictureFrame;
|
||||
|
||||
@ -239,7 +239,7 @@ void NeteaseCrypt::FixMetadata()
|
||||
audioFile = new TagLib::FLAC::File(mDumpFilepath.c_str());
|
||||
tag = audioFile->tag();
|
||||
|
||||
if (mImageData.length() > 0)
|
||||
if (!mImageData.empty())
|
||||
{
|
||||
TagLib::FLAC::Picture *cover = new TagLib::FLAC::Picture;
|
||||
cover->setMimeType(mimeType(mImageData));
|
||||
@ -257,7 +257,7 @@ void NeteaseCrypt::FixMetadata()
|
||||
tag->setAlbum(TagLib::String(mMetaData->album(), TagLib::String::UTF8));
|
||||
}
|
||||
|
||||
tag->setComment(TagLib::String("Create by taurusxin/ncmdump.", TagLib::String::UTF8));
|
||||
// tag->setComment(TagLib::String("Create by taurusxin/ncmdump.", TagLib::String::UTF8));
|
||||
|
||||
audioFile->save();
|
||||
audioFile->~File();
|
||||
@ -301,7 +301,7 @@ void NeteaseCrypt::Dump(std::string const &outputDir = "")
|
||||
mFormat = NeteaseCrypt::FLAC;
|
||||
}
|
||||
|
||||
output.open(mDumpFilepath, output.out | output.binary);
|
||||
output.open(mDumpFilepath, std::ofstream::out | std::ofstream::binary);
|
||||
}
|
||||
|
||||
output.write((char *)buffer.data(), n);
|
||||
|
@ -2142,7 +2142,7 @@ CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newit
|
||||
{
|
||||
cJSON *after_inserted = NULL;
|
||||
|
||||
if (which < 0)
|
||||
if (which < 0 || newitem == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2154,6 +2154,10 @@ CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newit
|
||||
return;
|
||||
}
|
||||
|
||||
if (after_inserted != array->child && newitem->prev == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
newitem->next = after_inserted;
|
||||
newitem->prev = after_inserted->prev;
|
||||
after_inserted->prev = newitem;
|
||||
|
2
taglib
2
taglib
@ -1 +1 @@
|
||||
Subproject commit 0896fb90920c125e55248360d271d1a1674e2a4d
|
||||
Subproject commit e3de03501ff66221d1f1f971022b248d5b38ba06
|
Loading…
Reference in New Issue
Block a user