Merge pull request #149 from ZaneYork/dev

修复网易云歌曲ID溢出问题
This commit is contained in:
Zony 2024-05-31 16:20:48 +08:00 committed by GitHub
commit 46ac2d57a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -4,13 +4,13 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
{
public class GetSongDetailsRequest
{
public GetSongDetailsRequest(int songId)
public GetSongDetailsRequest(long songId)
{
SongId = songId;
SongIds = $"%5B{songId}%5D";
}
[JsonProperty("id")] public int SongId { get; }
[JsonProperty("id")] public long SongId { get; }
[JsonProperty("ids")] public string SongIds { get; }
}

View File

@ -8,7 +8,7 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
[JsonProperty("code")] public int StatusCode { get; set; }
public int GetFirstMatchSongId(string songName, long? duration)
public long GetFirstMatchSongId(string songName, long? duration)
{
var perfectMatch = Items.SongItems.FirstOrDefault(x => x.Name == songName);
if (perfectMatch != null)
@ -44,7 +44,7 @@ namespace ZonyLrcTools.Common.Lyrics.Providers.NetEase.JsonModel
/// 歌曲的 Sid (Song Id)。
/// </summary>
[JsonProperty("id")]
public int Id { get; set; }
public long Id { get; set; }
/// <summary>
/// 歌曲的演唱者。