mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-09-05 21:16:52 +00:00
chore: Fix compilation warning messages.
This commit is contained in:
@@ -6,7 +6,7 @@ public class GetLyricsResponse
|
||||
{
|
||||
[JsonProperty("status")] public int Status { get; set; }
|
||||
|
||||
[JsonProperty("data")] public GetLyricsResponseInnerData Data { get; set; }
|
||||
[JsonProperty("data")] public GetLyricsResponseInnerData? Data { get; set; }
|
||||
|
||||
[JsonProperty("msg")] public string? ErrorMessage { get; set; }
|
||||
|
||||
@@ -20,7 +20,7 @@ public class GetLyricsResponseInnerData
|
||||
|
||||
public class GetLyricsItem
|
||||
{
|
||||
[JsonProperty("lineLyric")] public string Text { get; set; }
|
||||
[JsonProperty("lineLyric")] public string? Text { get; set; }
|
||||
|
||||
[JsonProperty("time")] public string Position { get; set; }
|
||||
[JsonProperty("time")] public string Position { get; set; } = null!;
|
||||
}
|
@@ -6,7 +6,7 @@ public class SongSearchResponse
|
||||
{
|
||||
[JsonProperty("code")] public int Code { get; set; }
|
||||
|
||||
[JsonProperty("data")] public SongSearchResponseInnerData InnerData { get; set; }
|
||||
[JsonProperty("data")] public SongSearchResponseInnerData InnerData { get; set; } = null!;
|
||||
|
||||
[JsonProperty("msg")] public string? ErrorMessage { get; set; }
|
||||
|
||||
@@ -29,9 +29,9 @@ public class SongSearchResponse
|
||||
|
||||
public class SongSearchResponseInnerData
|
||||
{
|
||||
[JsonProperty("total")] public string Total { get; set; }
|
||||
[JsonProperty("total")] public string? Total { get; set; }
|
||||
|
||||
[JsonProperty("list")] public ICollection<SongSearchResponseDetail> SongItems { get; set; }
|
||||
[JsonProperty("list")] public ICollection<SongSearchResponseDetail> SongItems { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class SongSearchResponseDetail
|
||||
|
@@ -60,7 +60,7 @@ public class KuWoLyricsProvider : LyricsProvider
|
||||
await ValueTask.CompletedTask;
|
||||
|
||||
var lyricsResponse = (GetLyricsResponse)lyricsObject;
|
||||
if (lyricsResponse.Data.Lyrics == null)
|
||||
if (lyricsResponse.Data?.Lyrics == null)
|
||||
{
|
||||
return new LyricsItemCollection(null);
|
||||
}
|
||||
|
Reference in New Issue
Block a user