mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-09-03 19:46:54 +00:00
fix: Fixed the error in the count of failure times.
This commit is contained in:
@@ -178,6 +178,7 @@ namespace ZonyLrcTools.Cli.Commands.SubCommand
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError($"下载歌词文件时发生错误:{ex.Message},歌曲名: {info.Name},歌手: {info.Artist}。");
|
_logger.LogError($"下载歌词文件时发生错误:{ex.Message},歌曲名: {info.Name},歌手: {info.Artist}。");
|
||||||
|
info.IsSuccessful = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -207,7 +208,7 @@ namespace ZonyLrcTools.Cli.Commands.SubCommand
|
|||||||
|
|
||||||
await Task.WhenAll(warpTaskList);
|
await Task.WhenAll(warpTaskList);
|
||||||
|
|
||||||
_logger.LogInformation($"专辑数据下载完成,成功: {musicInfos.Count} 失败{0}。");
|
_logger.LogInformation($"专辑数据下载完成,成功: {musicInfos.Count(m => m.IsSuccessful)} 失败{musicInfos.Count(m => !m.IsSuccessful)}。");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task DownloadAlbumTaskLogicAsync(IAlbumDownloader downloader, MusicInfo info)
|
private async Task DownloadAlbumTaskLogicAsync(IAlbumDownloader downloader, MusicInfo info)
|
||||||
|
@@ -20,6 +20,11 @@ namespace ZonyLrcTools.Cli.Infrastructure
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Artist { get; set; }
|
public string Artist { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否下载成功?
|
||||||
|
/// </summary>
|
||||||
|
public bool IsSuccessful { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 构建一个新的 <see cref="MusicInfo"/> 对象。
|
/// 构建一个新的 <see cref="MusicInfo"/> 对象。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Reference in New Issue
Block a user