Skip to content

fix(download): 正确地设置了 Album Artist#932

Draft
MoYingJi wants to merge 4 commits intoimsyy:devfrom
MoYingJi:pr/dba
Draft

fix(download): 正确地设置了 Album Artist#932
MoYingJi wants to merge 4 commits intoimsyy:devfrom
MoYingJi:pr/dba

Conversation

@MoYingJi
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings February 24, 2026 00:41
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @MoYingJi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求旨在修复下载歌曲时专辑艺术家元数据设置不正确的问题。通过在下载配置中引入专辑艺术家字段,并在下载管理器中实现从专辑详情API获取该信息的功能,最终确保下载的歌曲文件能够包含准确的专辑艺术家标签,提升了下载歌曲元数据的完整性。

Highlights

  • 专辑艺术家字段: 在下载配置中增加了专辑艺术家(Album Artist)字段,以便在下载过程中处理此元数据。
  • 获取专辑艺术家信息: 如果启用了元数据下载,下载管理器现在会通过调用 albumDetail API 来获取歌曲的专辑艺术家信息。
  • 元数据写入: 确保下载服务将获取到的专辑艺术家信息正确地写入到下载歌曲的元数据标签中。
Changelog
  • electron/main/services/DownloadService.ts
    • DownloadConfig 接口新增 albumArtist 属性。
    • download 方法现在接收并处理 albumArtist 参数。
    • 在写入歌曲元数据时,将 albumArtist 正确设置到标签中。
  • src/core/resource/DownloadManager.ts
    • 引入 albumDetail API 用于获取专辑详情。
    • DownloadConfig 接口新增 albumArtist 属性。
    • SongDownloadStrategy 类新增 albumArtist 私有属性。
    • 在 init 方法中增加了获取专辑艺术家信息的逻辑。
    • 在 getDownloadConfig 方法中传递 albumArtist。
Activity
  • 此拉取请求由 MoYingJi 创建,目前没有其他评论或审查活动。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

本次 PR 旨在修复下载文件时专辑艺术家(Album Artist)元数据未能正确设置的问题。实现方式是在 DownloadManager 中新增了获取专辑详情的逻辑,提取出专辑艺术家信息,然后通过 DownloadService 将其传递给原生下载模块,以便写入文件元数据。

整体改动清晰,解决了目标问题。我有一个关于性能优化的建议,主要是针对获取专辑详情的 API 调用增加缓存,以避免在下载同一张专辑的多首歌曲时发起重复的网络请求。具体细节请参考我在代码中的评论。

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the album artist metadata in the download functionality by properly fetching and setting the Album Artist field when downloading music files. The Album Artist is a standard metadata field in audio files that represents the primary artist of an album, which is especially useful for compilation albums or various artist albums.

Changes:

  • Added album artist fetching logic during download preparation
  • Updated download configuration to include album artist metadata
  • Integrated album artist into the native metadata writing process

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/core/resource/DownloadManager.ts Added albumDetail API import, albumArtist field to DownloadConfig interface and SongDownloadStrategy class, and logic to fetch album artist information during preparation
electron/main/services/DownloadService.ts Added albumArtist parameter to download options and integrated it into the SongMetadata structure for writing to audio files

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

@MoYingJi

This comment was marked as outdated.

@MoYingJi MoYingJi marked this pull request as draft February 24, 2026 13:59
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