feat: Add lyrics downloader related configuration items.

添加歌词下载器相关的配置项。
This commit is contained in:
real-zony 2021-05-11 00:31:14 +08:00
parent bad38ef34c
commit 172453b83f
3 changed files with 33 additions and 1 deletions

View File

@ -1,3 +1,5 @@
using System.Collections;
using System.Collections.Generic;
using ZonyLrcTools.Cli.Infrastructure.Lyric;
using ZonyLrcTools.Cli.Infrastructure.Network;
using ZonyLrcTools.Cli.Infrastructure.Tag;
@ -25,5 +27,10 @@ namespace ZonyLrcTools.Cli.Config
/// 网络代理相关的配置信息。
/// </summary>
public NetworkOptions NetworkOptions { get; set; }
/// <summary>
/// 歌词下载器相关的配置属性。
/// </summary>
public IEnumerable<LyricDownloaderOption> LyricDownloaderOptions { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace ZonyLrcTools.Cli.Infrastructure.Lyric
{
public class LyricDownloaderOption
{
/// <summary>
/// 歌词下载器的唯一标识。
/// </summary>
public string Name { get; set; }
/// <summary>
/// 歌词下载时的优先级,当值为 -1 时是禁用。
/// </summary>
public int Priority { get; set; }
}
}

View File

@ -15,6 +15,16 @@
},
"TagInfoProviderOptions": {
"FileNameRegularExpressions": "(?'artist'.+)\\s-\\s(?'name'.+)"
}
},
"LyricDownloader": [
{
"Name": "NetEase",
"Priority": 1
},
{
"Name": "QQMusic",
"Priority": 2
}
]
}
}