mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-07-01 20:30:41 +00:00
feat: QQ Music Downloader support dual language lyrics.
This commit is contained in:
parent
2c2c34f1a6
commit
d250524208
@ -65,7 +65,7 @@ namespace ZonyLrcTools.Cli.Infrastructure.Lyric.QQMusic
|
|||||||
var sourceLyric = HttpUtility.HtmlDecode(HttpUtility.HtmlDecode(lyricJsonObj.SelectToken("$.lyric").Value<string>()));
|
var sourceLyric = HttpUtility.HtmlDecode(HttpUtility.HtmlDecode(lyricJsonObj.SelectToken("$.lyric").Value<string>()));
|
||||||
var translateLyric = HttpUtility.HtmlDecode(HttpUtility.HtmlDecode(lyricJsonObj.SelectToken("$.trans").Value<string>()));
|
var translateLyric = HttpUtility.HtmlDecode(HttpUtility.HtmlDecode(lyricJsonObj.SelectToken("$.trans").Value<string>()));
|
||||||
|
|
||||||
return _lyricItemCollectionFactory.Build(sourceLyric);
|
return _lyricItemCollectionFactory.Build(sourceLyric, translateLyric);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void ValidateSongSearchResponse(SongSearchResponse response, LyricDownloaderArgs args)
|
protected virtual void ValidateSongSearchResponse(SongSearchResponse response, LyricDownloaderArgs args)
|
||||||
|
@ -25,5 +25,17 @@ namespace ZonyLrcTools.Tests.Infrastructure.Lyric
|
|||||||
lyric.ShouldNotBeNull();
|
lyric.ShouldNotBeNull();
|
||||||
lyric.IsPruneMusic.ShouldBe(false);
|
lyric.IsPruneMusic.ShouldBe(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// About the new feature mentioned in issue #87.
|
||||||
|
// Github Issue: https://github.com/real-zony/ZonyLrcToolsX/issues/87
|
||||||
|
[Fact]
|
||||||
|
public async Task DownloadAsync_Issue85_Test()
|
||||||
|
{
|
||||||
|
var lyric = await _lyricDownloader.DownloadAsync("Looking at Me", "Sabrina Carpenter");
|
||||||
|
|
||||||
|
lyric.ShouldNotBeNull();
|
||||||
|
lyric.IsPruneMusic.ShouldBeFalse();
|
||||||
|
lyric.ToString().ShouldContain("你好像快要不能呼吸");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user