aL1CesT 9cda87dbfe feat(desktop): 保存配置时不再重写整个 config.yaml
桌面端从共享的 DI 容器拿配置对象,再用 YamlDotNet 的序列化器整份写回。这样
一轮往返会把文件重写一遍:仓库里那 60 行、注释众多的 config.yaml 会变成 40
行机器生成的块,注释全没了,多行值的引号风格也变了。只要在设置页动一个开关,
注释就丢了。

SettingsStore 不再重新序列化整个文档,只补丁 UI 真正拥有的那几个键:

- PatchText 按行扫描 YAML,用缩进栈跟踪每个受管键的路径
  (networkOptions.isEnable、provider.lyric.plugin[NetEase].priority …),
  只替换那个标量,其余每一个字节 —— 注释、空行、列对齐 —— 保持原样。带
  引号的值保持原引号风格(QuotedScalarEventEmitter 沿用原文样式)。
- 补丁后的文本会被重新解析,并逐字段与预期值比对,通过才落盘。往返不一致
  就拒绝写入,磁盘上的文件保持不动。另有重新生成整份文件的兜底路径,用于
  原文件已被替换成补丁器无法跟随的内容时。

同一提交里还有:

- AppPaths:可执行文件所在目录可写时配置就放那里(便携安装),否则回退到
  %AppData%/ZonyLrcTools。写入走临时文件 + File.Move,崩溃不会留下半份配置。
- NetEaseSessionStore / KugouDatabaseStore:两个小 JSON,分别存网易云登录
  cookie 和用户手动指定的 KGMusicV3.db 路径。刻意与 config.yaml 分开 ——
  它们是机器状态而不是用户偏好,也不该出现在设置的 diff 里。
- ConfigurationServiceCollectionExtensions:构造与 CLI 相同的 GlobalOptions,
  但基于上面解析出的路径,而不是固定的 AppContext.BaseDirectory。

Common 为此一行未改:CLI 照旧从自己所在目录读 config.yaml。
2026-11-09 04:27:42 +08:00
2026-01-09 00:25:01 +08:00
2026-01-09 00:25:01 +08:00
2022-10-01 14:01:46 +08:00
2026-01-09 00:15:43 +08:00
2021-05-07 10:26:26 +08:00

English | 简体中文

Disclaimer

  • This tool is for personal learning and research purposes only. The executable binary files are for demonstration purposes only and the source code and its products must not be used for commercial purposes. Otherwise, I here will not be responsible for any related legal issues.
  • Any unit or individual that downloads and uses the software resulting in any accidents, negligence, contract breaches, defamation, copyright or intellectual property infringement, and their resulting losses (including but not limited to direct, indirect, incidental or derivative losses), I here will not bear any legal responsibility.
  • Users clearly agree to all the terms listed in this statement and fully assume the risks and consequences of using this tool. I here will not bear any legal responsibility.

Introduction

ZonyLrcToolX 4 is a cross-platform lyrics download tool based on CEF. QQ Group: 337656932. Detailed video tutorials are available in the group files.

🚧 The current version is under development. 🚧 If you want to see working code, please switch to the dev branch.

Download

To get the latest version, please visit the Release page for download.

Arch Linux User Repository

This software has been packaged into AUR. Arch Linux and its derivative distribution users can install it with the following command:

# yay or other AUR Helpers
yay -S zonylrctoolsx-bin

ZonyLrcTools.Cli --help

Usage

Detailed usage instructions have been moved to a new documentation site. Please visit https://docs.myzony.com for complete documentation.

Donation

爱发电

Star History

Star History Chart

S
Description
ZonyLrcToolsX 是一个能够方便地下载歌词的小软件。
Readme MIT
18 MiB
0 Stars 1 Watchers 0 Forks
Languages
C# 99.7%
PowerShell 0.2%
Shell 0.1%