mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-09-05 21:16:52 +00:00
fix: Fixed some unhandled exceptions.
This commit is contained in:
@@ -15,7 +15,7 @@ public class GetLyricsResponse
|
||||
|
||||
public class GetLyricsResponseInnerData
|
||||
{
|
||||
[JsonProperty("lrclist")] public ICollection<GetLyricsItem> Lyrics { get; set; }
|
||||
[JsonProperty("lrclist")] public ICollection<GetLyricsItem>? Lyrics { get; set; }
|
||||
}
|
||||
|
||||
public class GetLyricsItem
|
||||
|
@@ -60,6 +60,11 @@ public class KuWoLyricsProvider : LyricsProvider
|
||||
await ValueTask.CompletedTask;
|
||||
|
||||
var lyricsResponse = (GetLyricsResponse)lyricsObject;
|
||||
if (lyricsResponse.Data.Lyrics == null)
|
||||
{
|
||||
return new LyricsItemCollection(null);
|
||||
}
|
||||
|
||||
var items = lyricsResponse.Data.Lyrics.Select(l =>
|
||||
{
|
||||
var position = double.Parse(l.Position);
|
||||
|
Reference in New Issue
Block a user