mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-07-02 05:10:42 +00:00
fix: Fixed issue #106.
This commit is contained in:
parent
87f6a98668
commit
be4380c744
@ -67,17 +67,19 @@ namespace ZonyLrcTools.Cli.Commands.SubCommand
|
|||||||
|
|
||||||
protected override async Task<int> OnExecuteAsync(CommandLineApplication app)
|
protected override async Task<int> OnExecuteAsync(CommandLineApplication app)
|
||||||
{
|
{
|
||||||
var files = await ScanMusicFilesAsync();
|
|
||||||
var musicInfos = await LoadMusicInfoAsync(files);
|
|
||||||
|
|
||||||
if (DownloadLyric)
|
if (DownloadLyric)
|
||||||
{
|
{
|
||||||
await DownloadLyricFilesAsync(musicInfos);
|
await DownloadLyricFilesAsync(
|
||||||
|
await LoadMusicInfoAsync(
|
||||||
|
RemoveExistLyricFiles(
|
||||||
|
await ScanMusicFilesAsync())));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DownloadAlbum)
|
if (DownloadAlbum)
|
||||||
{
|
{
|
||||||
await DownloadAlbumAsync(musicInfos);
|
await DownloadAlbumAsync(
|
||||||
|
await LoadMusicInfoAsync(
|
||||||
|
await ScanMusicFilesAsync()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -95,8 +97,6 @@ namespace ZonyLrcTools.Cli.Commands.SubCommand
|
|||||||
throw new ErrorCodeException(ErrorCodes.NoFilesWereScanned);
|
throw new ErrorCodeException(ErrorCodes.NoFilesWereScanned);
|
||||||
}
|
}
|
||||||
|
|
||||||
files = RemoveExistLyricFiles(files);
|
|
||||||
|
|
||||||
_logger.LogInformation($"已经扫描到了 {files.Count} 个音乐文件。");
|
_logger.LogInformation($"已经扫描到了 {files.Count} 个音乐文件。");
|
||||||
|
|
||||||
return files;
|
return files;
|
||||||
|
@ -77,5 +77,12 @@ namespace ZonyLrcTools.Tests.Infrastructure.Lyric
|
|||||||
|
|
||||||
lyric.ShouldNotBeNull();
|
lyric.ShouldNotBeNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task DownloaderAsync_Issue101_Test()
|
||||||
|
{
|
||||||
|
var lyric = await _lyricDownloader.DownloadAsync("君への嘘", "VALSHE");
|
||||||
|
lyric.ShouldNotBeEmpty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user