mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-09-06 05:36:53 +00:00
chore: Fix compilation warning messages.
This commit is contained in:
@@ -18,6 +18,6 @@ namespace ZonyLrcTools.Common.Lyrics
|
||||
/// <param name="sourceLyric">原始歌词数据。</param>
|
||||
/// <param name="translationLyric">翻译歌词数据。</param>
|
||||
/// <returns>构建完成的 <see cref="LyricsItemCollection"/> 对象。</returns>
|
||||
LyricsItemCollection Build(string sourceLyric, string? translationLyric);
|
||||
LyricsItemCollection Build(string? sourceLyric, string? translationLyric);
|
||||
}
|
||||
}
|
@@ -12,7 +12,7 @@ namespace ZonyLrcTools.Common.Lyrics
|
||||
/// <param name="artist">歌曲的作者。</param>
|
||||
/// <param name="duration">歌曲的时长。</param>
|
||||
/// <returns>歌曲的歌词数据对象。</returns>
|
||||
ValueTask<LyricsItemCollection> DownloadAsync(string? songName, string? artist, long? duration = null);
|
||||
ValueTask<LyricsItemCollection> DownloadAsync(string songName, string artist, long? duration = null);
|
||||
|
||||
/// <summary>
|
||||
/// 下载器的名称。
|
||||
|
@@ -15,7 +15,7 @@ namespace ZonyLrcTools.Common.Lyrics
|
||||
/// <summary>
|
||||
/// 歌词文本数据。
|
||||
/// </summary>
|
||||
public string LyricText { get; }
|
||||
public string? LyricText { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 歌词所在的时间(分)。
|
||||
@@ -55,21 +55,21 @@ namespace ZonyLrcTools.Common.Lyrics
|
||||
/// <param name="minute">歌词所在的时间(分)。</param>
|
||||
/// <param name="second">歌词所在的时间(秒)。</param>
|
||||
/// <param name="lyricText">歌词文本数据。</param>
|
||||
public LyricsItem(int minute, double second, string lyricText)
|
||||
public LyricsItem(int minute, double second, string? lyricText)
|
||||
{
|
||||
Minute = minute;
|
||||
Second = second;
|
||||
LyricText = lyricText;
|
||||
}
|
||||
|
||||
public int CompareTo(LyricsItem other)
|
||||
public int CompareTo(LyricsItem? other)
|
||||
{
|
||||
if (SortScore > other.SortScore)
|
||||
if (SortScore > other?.SortScore)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (SortScore < other.SortScore)
|
||||
if (SortScore < other?.SortScore)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@@ -87,12 +87,12 @@ namespace ZonyLrcTools.Common.Lyrics
|
||||
return left.SortScore < right.SortScore;
|
||||
}
|
||||
|
||||
public static bool operator ==(LyricsItem left, LyricsItem right)
|
||||
public static bool operator ==(LyricsItem? left, LyricsItem? right)
|
||||
{
|
||||
return (int?)left?.SortScore == (int?)right?.SortScore;
|
||||
}
|
||||
|
||||
public static bool operator !=(LyricsItem item1, LyricsItem item2)
|
||||
public static bool operator !=(LyricsItem? item1, LyricsItem? item2)
|
||||
{
|
||||
return !(item1 == item2);
|
||||
}
|
||||
@@ -107,7 +107,7 @@ namespace ZonyLrcTools.Common.Lyrics
|
||||
return LyricText == other.LyricText && Minute == other.Minute && Second.Equals(other.Second);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
|
@@ -14,7 +14,7 @@ namespace ZonyLrcTools.Common.Lyrics
|
||||
/// </summary>
|
||||
public bool IsPruneMusic => Count == 0;
|
||||
|
||||
public GlobalLyricsConfigOptions? Options { get; private set; }
|
||||
public GlobalLyricsConfigOptions? Options { get; }
|
||||
|
||||
public LyricsItemCollection(GlobalLyricsConfigOptions? options)
|
||||
{
|
||||
@@ -29,6 +29,11 @@ namespace ZonyLrcTools.Common.Lyrics
|
||||
}
|
||||
|
||||
var option = left.Options;
|
||||
if (option == null)
|
||||
{
|
||||
throw new NullReferenceException("LyricsItemCollection.Options");
|
||||
}
|
||||
|
||||
var newCollection = new LyricsItemCollection(option);
|
||||
var indexDiff = left.Count - right.Count;
|
||||
if (!option.IsOneLine)
|
||||
@@ -100,6 +105,11 @@ namespace ZonyLrcTools.Common.Lyrics
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (Options == null)
|
||||
{
|
||||
throw new NullReferenceException("LyricsItemCollection.Options");
|
||||
}
|
||||
|
||||
var lyricBuilder = new StringBuilder();
|
||||
ForEach(lyric => lyricBuilder.Append(lyric).Append(Options.LineBreak));
|
||||
return lyricBuilder.ToString().TrimEnd(Options.LineBreak);
|
||||
|
@@ -30,7 +30,7 @@ namespace ZonyLrcTools.Common.Lyrics
|
||||
return lyric;
|
||||
}
|
||||
|
||||
public LyricsItemCollection Build(string sourceLyric, string? translationLyric)
|
||||
public LyricsItemCollection Build(string? sourceLyric, string? translationLyric)
|
||||
{
|
||||
var lyric = new LyricsItemCollection(_options.Provider.Lyric.Config);
|
||||
if (string.IsNullOrEmpty(sourceLyric))
|
||||
|
@@ -10,9 +10,9 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou.JsonModel
|
||||
|
||||
[JsonProperty("client")] public string UnknownParameters3 { get; }
|
||||
|
||||
[JsonProperty("hash")] public string FileHash { get; }
|
||||
[JsonProperty("hash")] public string? FileHash { get; }
|
||||
|
||||
public GetLyricAccessKeyRequest(string fileHash)
|
||||
public GetLyricAccessKeyRequest(string? fileHash)
|
||||
{
|
||||
UnknownParameters1 = 1;
|
||||
UnknownParameters2 = "yes";
|
||||
|
@@ -8,13 +8,13 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou.JsonModel
|
||||
|
||||
[JsonProperty("errcode")] public int ErrorCode { get; set; }
|
||||
|
||||
[JsonProperty("candidates")] public List<GetLyricAccessKeyDataObject> AccessKeyDataObjects { get; set; }
|
||||
[JsonProperty("candidates")] public List<GetLyricAccessKeyDataObject>? AccessKeyDataObjects { get; set; }
|
||||
}
|
||||
|
||||
public class GetLyricAccessKeyDataObject
|
||||
{
|
||||
[JsonProperty("accesskey")] public string AccessKey { get; set; }
|
||||
[JsonProperty("accesskey")] public string? AccessKey { get; set; }
|
||||
|
||||
[JsonProperty("id")] public string Id { get; set; }
|
||||
[JsonProperty("id")] public string? Id { get; set; }
|
||||
}
|
||||
}
|
@@ -12,11 +12,11 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou.JsonModel
|
||||
|
||||
[JsonProperty("charset")] public string UnknownParameters4 { get; }
|
||||
|
||||
[JsonProperty("id")] public string Id { get; }
|
||||
[JsonProperty("id")] public string? Id { get; }
|
||||
|
||||
[JsonProperty("accesskey")] public string AccessKey { get; }
|
||||
[JsonProperty("accesskey")] public string? AccessKey { get; }
|
||||
|
||||
public GetLyricRequest(string id, string accessKey)
|
||||
public GetLyricRequest(string? id, string? accessKey)
|
||||
{
|
||||
UnknownParameters1 = 1;
|
||||
UnknownParameters2 = "iphone";
|
||||
|
@@ -6,20 +6,20 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou.JsonModel
|
||||
{
|
||||
[JsonProperty("status")] public int Status { get; set; }
|
||||
|
||||
[JsonProperty("data")] public SongSearchResponseInnerData Data { get; set; }
|
||||
[JsonProperty("data")] public SongSearchResponseInnerData? Data { get; set; }
|
||||
|
||||
[JsonProperty("error_code")] public int ErrorCode { get; set; }
|
||||
|
||||
[JsonProperty("error_msg")] public string ErrorMessage { get; set; }
|
||||
[JsonProperty("error_msg")] public string? ErrorMessage { get; set; }
|
||||
}
|
||||
|
||||
public class SongSearchResponseInnerData
|
||||
{
|
||||
[JsonProperty("lists")] public List<SongSearchResponseSongDetail> List { get; set; }
|
||||
[JsonProperty("lists")] public List<SongSearchResponseSongDetail>? List { get; set; }
|
||||
}
|
||||
|
||||
public class SongSearchResponseSongDetail
|
||||
{
|
||||
public string FileHash { get; set; }
|
||||
public string? FileHash { get; set; }
|
||||
}
|
||||
}
|
@@ -38,9 +38,9 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou
|
||||
|
||||
// 获得特殊的 AccessToken 与 Id,真正请求歌词数据。
|
||||
var accessKeyResponse = await _warpHttpClient.GetAsync<GetLyricAccessKeyResponse>(KuGouGetLyricAccessKeyUrl,
|
||||
new GetLyricAccessKeyRequest(searchResult.Data.List[0].FileHash));
|
||||
new GetLyricAccessKeyRequest(searchResult.Data?.List?[0].FileHash));
|
||||
|
||||
if (accessKeyResponse.AccessKeyDataObjects.Count == 0)
|
||||
if (accessKeyResponse.AccessKeyDataObjects == null || accessKeyResponse.AccessKeyDataObjects.Count == 0)
|
||||
{
|
||||
throw new ErrorCodeException(ErrorCodes.NoMatchingSong, attachObj: args);
|
||||
}
|
||||
@@ -54,18 +54,18 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.KuGou
|
||||
{
|
||||
await ValueTask.CompletedTask;
|
||||
var lyricJsonObj = JObject.Parse((data as string)!);
|
||||
if (lyricJsonObj.SelectToken("$.status").Value<int>() != 200)
|
||||
if (lyricJsonObj.SelectToken("$.status")?.Value<int>() != 200)
|
||||
{
|
||||
throw new ErrorCodeException(ErrorCodes.NoMatchingSong, attachObj: args);
|
||||
}
|
||||
|
||||
var lyricText = Encoding.UTF8.GetString(Convert.FromBase64String(lyricJsonObj.SelectToken("$.content").Value<string>()));
|
||||
var lyricText = Encoding.UTF8.GetString(Convert.FromBase64String(lyricJsonObj.SelectToken("$.content")?.Value<string>() ?? string.Empty));
|
||||
return _lyricsItemCollectionFactory.Build(lyricText);
|
||||
}
|
||||
|
||||
protected virtual void ValidateSongSearchResponse(SongSearchResponse response, LyricsProviderArgs args)
|
||||
{
|
||||
if ((response.ErrorCode != 0 && response.Status != 1) || response.Data.List.Count == 0)
|
||||
if ((response.ErrorCode != 0 && response.Status != 1) || response.Data?.List?.Count == 0)
|
||||
{
|
||||
throw new ErrorCodeException(ErrorCodes.NoMatchingSong, attachObj: args);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -8,13 +8,13 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
|
||||
/// 原始的歌词。
|
||||
/// </summary>
|
||||
[JsonProperty("lrc")]
|
||||
public InnerLyric OriginalLyric { get; set; }
|
||||
public InnerLyric? OriginalLyric { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 卡拉 OK 歌词。
|
||||
/// </summary>
|
||||
[JsonProperty("klyric")]
|
||||
public InnerLyric KaraokeLyric { get; set; }
|
||||
public InnerLyric? KaraokeLyric { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 如果存在翻译歌词,则本项内容为翻译歌词。
|
||||
@@ -26,13 +26,13 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
|
||||
/// 如果存在罗马音歌词,则本项内容为罗马音歌词。
|
||||
/// </summary>
|
||||
[JsonProperty("romalrc")]
|
||||
public InnerLyric RomaLyric { get; set; }
|
||||
public InnerLyric? RomaLyric { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态码。
|
||||
/// </summary>
|
||||
[JsonProperty("code")]
|
||||
public string StatusCode { get; set; }
|
||||
public string? StatusCode { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -40,12 +40,12 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
|
||||
/// </summary>
|
||||
public class InnerLyric
|
||||
{
|
||||
[JsonProperty("version")] public string Version { get; set; }
|
||||
[JsonProperty("version")] public string? Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 具体的歌词数据。
|
||||
/// </summary>
|
||||
[JsonProperty("lyric")]
|
||||
public string Text { get; set; }
|
||||
public string? Text { get; set; }
|
||||
}
|
||||
}
|
@@ -45,17 +45,14 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
|
||||
|
||||
[JsonProperty("crypto")] public string Crypto { get; set; } = "weapi";
|
||||
|
||||
public SongSearchRequest()
|
||||
public SongSearchRequest(string musicName, string artistName, int limit = 10)
|
||||
{
|
||||
CsrfToken = string.Empty;
|
||||
Type = 1;
|
||||
Offset = 0;
|
||||
IsTotal = true;
|
||||
Limit = 10;
|
||||
}
|
||||
|
||||
public SongSearchRequest(string musicName, string artistName, int limit = 10) : this()
|
||||
{
|
||||
// Remove all the brackets and the content inside them.
|
||||
var regex = new Regex(@"\([^)]*\)");
|
||||
musicName = regex.Replace(musicName, string.Empty);
|
||||
|
@@ -4,7 +4,7 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
|
||||
{
|
||||
public class SongSearchResponse
|
||||
{
|
||||
[JsonProperty("result")] public InnerListItemModel? Items { get; set; }
|
||||
[JsonProperty("result")] public InnerListItemModel Items { get; set; } = null!;
|
||||
|
||||
[JsonProperty("code")] public int StatusCode { get; set; }
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
|
||||
|
||||
public class InnerListItemModel
|
||||
{
|
||||
[JsonProperty("songs")] public IList<SongModel>? SongItems { get; set; }
|
||||
[JsonProperty("songs")] public IList<SongModel> SongItems { get; set; } = null!;
|
||||
|
||||
[JsonProperty("songCount")] public int SongCount { get; set; }
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
|
||||
/// 歌曲的名称。
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 歌曲的 Sid (Song Id)。
|
||||
@@ -50,13 +50,13 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
|
||||
/// 歌曲的演唱者。
|
||||
/// </summary>
|
||||
[JsonProperty("artists")]
|
||||
public IList<SongArtistModel> Artists { get; set; }
|
||||
public IList<SongArtistModel>? Artists { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 歌曲的专辑信息。
|
||||
/// </summary>
|
||||
[JsonProperty("album")]
|
||||
public SongAlbumModel Album { get; set; }
|
||||
public SongAlbumModel? Album { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 歌曲的实际长度。
|
||||
@@ -71,7 +71,7 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
|
||||
/// 歌手/艺术家的名称。
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
}
|
||||
|
||||
public class SongAlbumModel
|
||||
@@ -80,12 +80,12 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
|
||||
/// 专辑的名称。
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 专辑图像的 Url 地址。
|
||||
/// </summary>
|
||||
[JsonProperty("img1v1Url")]
|
||||
public string PictureUrl { get; set; }
|
||||
public string? PictureUrl { get; set; }
|
||||
}
|
||||
}
|
@@ -16,10 +16,6 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.QQMusic.JsonModel
|
||||
|
||||
[JsonProperty("g_tk")] public int Gtk { get; set; }
|
||||
|
||||
protected GetLyricRequest()
|
||||
{
|
||||
}
|
||||
|
||||
public GetLyricRequest(string? songId)
|
||||
{
|
||||
IsNoBase64Encoding = 1;
|
||||
|
@@ -19,8 +19,8 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.QQMusic.JsonModel
|
||||
public string Platform { get; protected set; }
|
||||
|
||||
[JsonProperty("key")]
|
||||
public string Keyword { get; protected set; }
|
||||
|
||||
public string Keyword { get; protected set; } = null!;
|
||||
|
||||
protected SongSearchRequest()
|
||||
{
|
||||
Format = "json";
|
||||
|
@@ -6,21 +6,21 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.QQMusic.JsonModel
|
||||
{
|
||||
[JsonProperty("code")] public int StatusCode { get; set; }
|
||||
|
||||
[JsonProperty("data")] public QQMusicInnerDataModel Data { get; set; }
|
||||
[JsonProperty("data")] public QQMusicInnerDataModel? Data { get; set; }
|
||||
}
|
||||
|
||||
public class QQMusicInnerDataModel
|
||||
{
|
||||
[JsonProperty("song")] public QQMusicInnerSongModel Song { get; set; }
|
||||
[JsonProperty("song")] public QQMusicInnerSongModel? Song { get; set; }
|
||||
}
|
||||
|
||||
public class QQMusicInnerSongModel
|
||||
{
|
||||
[JsonProperty("itemlist")] public List<QQMusicInnerSongItem> SongItems { get; set; }
|
||||
[JsonProperty("itemlist")] public List<QQMusicInnerSongItem>? SongItems { get; set; }
|
||||
}
|
||||
|
||||
public class QQMusicInnerSongItem
|
||||
{
|
||||
[JsonProperty("mid")] public string SongId { get; set; }
|
||||
[JsonProperty("mid")] public string? SongId { get; set; }
|
||||
}
|
||||
}
|
@@ -35,7 +35,7 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.QQMusic
|
||||
ValidateSongSearchResponse(searchResult, args);
|
||||
|
||||
return await _warpHttpClient.GetAsync(QQGetLyricUrl,
|
||||
new GetLyricRequest(searchResult.Data.Song.SongItems.FirstOrDefault()?.SongId),
|
||||
new GetLyricRequest(searchResult.Data?.Song?.SongItems?.FirstOrDefault()?.SongId),
|
||||
op => op.Headers.Referrer = new Uri(QQMusicRequestReferer));
|
||||
}
|
||||
|
||||
@@ -57,15 +57,15 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.QQMusic
|
||||
}
|
||||
|
||||
var lyricJsonObj = JObject.Parse(lyricJsonString);
|
||||
var sourceLyric = HttpUtility.HtmlDecode(HttpUtility.HtmlDecode(lyricJsonObj.SelectToken("$.lyric").Value<string>()));
|
||||
var translateLyric = HttpUtility.HtmlDecode(HttpUtility.HtmlDecode(lyricJsonObj.SelectToken("$.trans").Value<string>()));
|
||||
var sourceLyric = HttpUtility.HtmlDecode(HttpUtility.HtmlDecode(lyricJsonObj.SelectToken("$.lyric")!.Value<string>()));
|
||||
var translateLyric = HttpUtility.HtmlDecode(HttpUtility.HtmlDecode(lyricJsonObj.SelectToken("$.trans")!.Value<string>()));
|
||||
|
||||
return _lyricsItemCollectionFactory.Build(sourceLyric, translateLyric);
|
||||
}
|
||||
|
||||
protected virtual void ValidateSongSearchResponse(SongSearchResponse response, LyricsProviderArgs args)
|
||||
{
|
||||
if (response is not { StatusCode: 0 } || response.Data.Song.SongItems == null)
|
||||
if (response is not { StatusCode: 0 } || response.Data?.Song?.SongItems == null)
|
||||
{
|
||||
throw new ErrorCodeException(ErrorCodes.TheReturnValueIsIllegal, attachObj: args);
|
||||
}
|
||||
|
Reference in New Issue
Block a user