mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-07-01 20:30:41 +00:00
refactor: Adjusted the structure of the configuration file.
BREAKING CHANGE: Adjusted the internal structure of the config.yaml file, removed the top-level hierarchy.
This commit is contained in:
parent
2dca5239f5
commit
8b5d5c64b0
@ -81,8 +81,7 @@ namespace ZonyLrcTools.Cli
|
|||||||
.ConfigureLogging(l => l.AddSerilog())
|
.ConfigureLogging(l => l.AddSerilog())
|
||||||
.ConfigureHostConfiguration(builder =>
|
.ConfigureHostConfiguration(builder =>
|
||||||
{
|
{
|
||||||
builder
|
builder.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
|
||||||
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
|
|
||||||
.AddYamlFile("config.yaml");
|
.AddYamlFile("config.yaml");
|
||||||
})
|
})
|
||||||
.ConfigureServices((_, services) =>
|
.ConfigureServices((_, services) =>
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
globalOption:
|
# 允许扫描的歌曲文件后缀名。
|
||||||
# 允许扫描的歌曲文件后缀名。
|
supportFileExtensions:
|
||||||
supportFileExtensions:
|
|
||||||
- '*.mp3'
|
- '*.mp3'
|
||||||
- '*.flac'
|
- '*.flac'
|
||||||
- '*.wav'
|
- '*.wav'
|
||||||
- '*.m4a'
|
- '*.m4a'
|
||||||
- '*.ogg'
|
- '*.ogg'
|
||||||
- '*.opus'
|
- '*.opus'
|
||||||
# 网络代理服务设置,仅支持 HTTP 代理。
|
|
||||||
networkOptions:
|
# 网络代理服务设置,仅支持 HTTP 代理。
|
||||||
|
networkOptions:
|
||||||
isEnable: false # 是否启用代理。
|
isEnable: false # 是否启用代理。
|
||||||
ip: 127.0.0.1 # 代理服务 IP 地址。
|
ip: 127.0.0.1 # 代理服务 IP 地址。
|
||||||
port: 4780 # 代理服务端口号。
|
port: 4780 # 代理服务端口号。
|
||||||
updateUrl: https://api.myzony.com/lrc-tools/update # 更新检查地址。
|
updateUrl: https://api.myzony.com/lrc-tools/update # 更新检查地址。
|
||||||
|
|
||||||
# 下载器的相关参数配置。
|
# 下载器的相关参数配置。
|
||||||
provider:
|
provider:
|
||||||
# 标签扫描器的相关参数配置。
|
# 标签扫描器的相关参数配置。
|
||||||
tag:
|
tag:
|
||||||
# 支持的标签扫描器。
|
# 支持的标签扫描器。
|
||||||
|
@ -16,5 +16,10 @@
|
|||||||
/// 搜索深度,值越大搜索结果越多,但搜索时间越长。
|
/// 搜索深度,值越大搜索结果越多,但搜索时间越长。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Depth { get; set; }
|
public int Depth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 歌词下载器的扩展属性。
|
||||||
|
/// </summary>
|
||||||
|
public Dictionary<string, string>? Additional { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -19,5 +19,10 @@ namespace ZonyLrcTools.Common.Configuration
|
|||||||
/// 代理服务器的 端口。
|
/// 代理服务器的 端口。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Port { get; set; }
|
public int Port { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新检查的 Url。
|
||||||
|
/// </summary>
|
||||||
|
public string UpdateUrl { get; set; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -47,7 +47,7 @@ namespace ZonyLrcTools.Common.Infrastructure.DependencyInject
|
|||||||
.AddYamlFile("config.yaml")
|
.AddYamlFile("config.yaml")
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
services.Configure<GlobalOptions>(configuration.GetSection("globalOption"));
|
services.Configure<GlobalOptions>(configuration);
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
globalOption:
|
# 允许扫描的歌曲文件后缀名。
|
||||||
# 允许扫描的歌曲文件后缀名。
|
supportFileExtensions:
|
||||||
supportFileExtensions:
|
|
||||||
- '*.mp3'
|
- '*.mp3'
|
||||||
- '*.flac'
|
- '*.flac'
|
||||||
- '*.wav'
|
- '*.wav'
|
||||||
- '*.m4a'
|
- '*.m4a'
|
||||||
- '*.ogg'
|
- '*.ogg'
|
||||||
- '*.opus'
|
- '*.opus'
|
||||||
# 网络代理服务设置,仅支持 HTTP 代理。
|
|
||||||
networkOptions:
|
# 网络代理服务设置,仅支持 HTTP 代理。
|
||||||
|
networkOptions:
|
||||||
isEnable: false # 是否启用代理。
|
isEnable: false # 是否启用代理。
|
||||||
ip: 127.0.0.1 # 代理服务 IP 地址。
|
ip: 127.0.0.1 # 代理服务 IP 地址。
|
||||||
port: 4780 # 代理服务端口号。
|
port: 4780 # 代理服务端口号。
|
||||||
updateUrl: https://api.myzony.com/lrc-tools/update # 更新检查地址。
|
updateUrl: https://api.myzony.com/lrc-tools/update # 更新检查地址。
|
||||||
|
|
||||||
# 下载器的相关参数配置。
|
# 下载器的相关参数配置。
|
||||||
provider:
|
provider:
|
||||||
# 标签扫描器的相关参数配置。
|
# 标签扫描器的相关参数配置。
|
||||||
tag:
|
tag:
|
||||||
# 支持的标签扫描器。
|
# 支持的标签扫描器。
|
||||||
|
Loading…
x
Reference in New Issue
Block a user