feat: 增加歌曲错误提示。

This commit is contained in:
real-zony
2022-01-05 22:41:14 +08:00
parent 1f505f2f72
commit c6a275ce07
2 changed files with 7 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.IO;
@@ -172,6 +173,10 @@ namespace ZonyLrcTools.Cli.Commands
_logger.LogWarningInfo(ex);
}
catch (Exception ex)
{
_logger.LogError($"下载歌词文件时发生错误:{ex.Message},歌曲名: {info.Name},歌手: {info.Artist}。");
}
return true;
}
@@ -206,7 +211,7 @@ namespace ZonyLrcTools.Cli.Commands
private async Task DownloadAlbumTaskLogicAsync(IAlbumDownloader downloader, MusicInfo info)
{
_logger.LogMusicInfoWithInformation(info);
try
{
var album = await downloader.DownloadAsync(info.Name, info.Artist);