Skip to content

feat: 调用音频url接口下载歌曲 - #43

Open
lrst6963 wants to merge 3 commits into
chaunsin:masterfrom
lrst6963:master
Open

feat: 调用音频url接口下载歌曲#43
lrst6963 wants to merge 3 commits into
chaunsin:masterfrom
lrst6963:master

Conversation

@lrst6963

Copy link
Copy Markdown
  • 调用 音频url接口可绕过下载限制
  • 添加进度条管理器支持多任务并行显示(后续可添加配置任务数和切片下载)
  • 为下载的歌曲元数据写入
  • 优化 API 请求参数处理
  • 更新依赖库版本
image

- 添加进度条管理器支持多任务并行显示
- 实现 MP3/FLAC 格式的 ID3v2 和 Vorbis 标签写入
- 增加专辑封面和歌词下载功能
- 优化 API 请求参数处理
- 更新依赖库版本
@chaunsin

Copy link
Copy Markdown
Owner
  • 调用 音频url接口可绕过下载限制
  • 添加进度条管理器支持多任务并行显示(后续可添加配置任务数和切片下载)
  • 为下载的歌曲元数据写入
  • 优化 API 请求参数处理
  • 更新依赖库版本
image

感谢代码贡献代码,最近有些繁忙,代码改动稍多些,抽时间看下。

@chaunsin chaunsin Mar 6, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议,进度条处理采用本库引入的 github.com/cheggaaa/pb/v3 进行统一处理,便于代码维护。

Comment thread go.mod

@chaunsin chaunsin Mar 6, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github.com/go-flac/xxx 建议使用 v2版本库实现,减少包的体积,以及避免一些bug问题。

@chaunsin chaunsin left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为了保证代码质量,以及可维护性,建议对代码做出调整,调整内容看请comment。

Comment thread internal/ncmctl/download.go Outdated
Ids: types.IntsString{songId},
Level: types.Level(c.opts.Level),
EncodeType: "flac",
ImmerseType: "c51",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EncodeType和ImmerseType参数应该暴漏给上层调用,用户会存在下载其他歌曲音质情况,根据命令行参数。

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用 pkg/ncm/tag 包中得方法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants