Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c676910
chores: Simulate PC Headers
Raspberry-Monster Jun 12, 2025
838400d
feat: implement API caching mechanism for improved data retrieval
kengwang Jun 19, 2025
d0f86a6
chore: 优化 API 结构
kengwang Jul 23, 2025
d528a20
chore: fix artist wrong name
kengwang Aug 11, 2025
ed38cdf
chores: 代码清理
Raspberry-Monster Aug 24, 2025
e9a093d
Fix: 修复类型转换问题并优化代码兼容性
zhh134 Nov 14, 2025
6ab4364
chores: Reverse secretKey Dircetly
Raspberry-Monster Jan 5, 2026
17ac904
chores: Bump System.Text.Json
Raspberry-Monster Jan 7, 2026
380fff9
chores: Update UnitTest
Raspberry-Monster Jan 10, 2026
b921f07
chores: Prepare for NativeAOT
Raspberry-Monster Jan 10, 2026
897f4c9
BugFix: Fix DefaultContext Parsing Errors
Raspberry-Monster Jan 10, 2026
63dbf34
feat: 适配 NativeAOT
kengwang Jan 11, 2026
cb6becd
chore: 删除文件
kengwang Jan 11, 2026
d3199d0
chore<ci>: Update CI
kengwang Jan 11, 2026
d312010
chore<ci>: Update NativeAOT Test
kengwang Jan 11, 2026
bb824b8
chore<ci>: Add TFM net9.0
kengwang Jan 11, 2026
bf5db8f
chore<ci>: Update Restore
kengwang Jan 11, 2026
b538d93
chore<ci>: Update Restore Command
kengwang Jan 11, 2026
063af34
chore<ci>: fix pipeline
kengwang Jan 11, 2026
c0fef89
chore: Ignore Template file
kengwang Jan 11, 2026
5506890
chores: Disable STJ NativeAOT Warnings
Raspberry-Monster Jan 12, 2026
b5a3e88
chores: Add compile platform
Raspberry-Monster Jan 12, 2026
061c0f6
chore(deps): update dependency tunit to 1.9.85
renovate[bot] Jan 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/nativeaot-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: NativeAOT Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test-aot:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Write Secret into file
uses: "DamianReeves/write-file-action@master"
with:
path: HyPlayer.NeteaseProvider.Tests/Secrets.cs
write-mode: overwrite
contents: |
${{ secrets.NETEASE_LOGIN_SECRET }}

- name: Restore
run: dotnet restore -r linux-x64 -p:TargetFramework=net9.0

- name: Publish with AOT
run: dotnet publish -c Release -f net9.0 -r linux-x64 --no-restore

- name: Run AOT tests
run: ./HyPlayer.NeteaseProvider.Tests/bin/Release/net9.0/linux-x64/publish/HyPlayer.NeteaseProvider.Tests
4 changes: 1 addition & 3 deletions .github/workflows/nuget-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ jobs:
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
run: dotnet build --no-restore --configuration Release
- name: Build NuGet Packages
run: |
dotnet pack HyPlayer.NeteaseApi/HyPlayer.NeteaseApi.csproj -c Release -o Packages/
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
name: Test on ${{ matrix.os }} - .NET ${{ matrix.dotnet-version }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [windows-latest]
dotnet-version: ['9.0.x']
fail-fast: false # Continue running other jobs if one fails

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Write Secret into file
uses: "DamianReeves/write-file-action@master"
with:
path: HyPlayer.NeteaseProvider.Tests/Secrets.cs
write-mode: overwrite
contents: |
${{ secrets.NETEASE_LOGIN_SECRET }}

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Run tests with coverage
run: dotnet test --configuration Release --no-build -- --coverage --report-trx --results-directory ./TestResults

- name: Upload test results
if: always() # Run even if tests fail
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}-${{ matrix.dotnet-version }}
path: ./TestResults/*.trx

- name: Upload coverage
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os }}-${{ matrix.dotnet-version }}
path: ./TestResults/*.coverage

publish-results:
name: Publish Test Results
needs: test
runs-on: ubuntu-latest
if: always()

steps:
- name: Download all test results
uses: actions/download-artifact@v4
with:
pattern: test-results-*
path: ./TestResults

- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: ./TestResults/**/*.trx
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -681,4 +681,6 @@ fabric.properties
### VisualStudio Patch ###
# Additional files built by Visual Studio

# End of https://www.toptal.com/developers/gitignore/api/rider,csharp,dotnetcore,visualstudio
# End of https://www.toptal.com/developers/gitignore/api/rider,csharp,dotnetcore,visualstudio

*.g.cs
6 changes: 6 additions & 0 deletions .idea/.idea.HyPlayer.NeteaseProvider/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion HyPlayer.NeteaseApi/ApiContracts/Album/AlbumApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Album;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Album;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using System.Text.Json.Serialization;

namespace HyPlayer.NeteaseApi.ApiContracts
Expand Down
2 changes: 1 addition & 1 deletion HyPlayer.NeteaseApi/ApiContracts/Album/AlbumSublistApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Album;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Album;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using System.Text.Json.Serialization;

namespace HyPlayer.NeteaseApi.ApiContracts
Expand Down
2 changes: 1 addition & 1 deletion HyPlayer.NeteaseApi/ApiContracts/Artist/ArtistAlbumsApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Artist;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down
7 changes: 4 additions & 3 deletions HyPlayer.NeteaseApi/ApiContracts/Artist/ArtistDetailApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Artist;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down Expand Up @@ -53,14 +53,15 @@ public class ArtistDetailDto
[JsonPropertyName("name")] public string? Name { get; set; }
[JsonPropertyName("alias")] public string[]? Alias { get; set; }
[JsonPropertyName("followed")] public bool Followed { get; set; }
[JsonPropertyName("cover")] public string? PicUrl { get; set; }
[JsonPropertyName("avatar")] public string? Img1v1Url { get; set; }
[JsonPropertyName("picUrl")] public string? PicUrl { get; set; }
[JsonPropertyName("img1v1Url")] public string? Img1v1Url { get; set; }
[JsonPropertyName("briefDesc")] public string? BriefDesc { get; set; }
[JsonPropertyName("trans")] public string? Translation { get; set; }
[JsonPropertyName("musicSize")] public int MusicSize { get; set; }
[JsonPropertyName("albumSize")] public int AlbumSize { get; set; }
[JsonPropertyName("mvSize")] public int MvSize { get; set; }
[JsonPropertyName("transNames")] public string[]? TransNames { get; set; }
[JsonPropertyName("accountId")] public string? AccountId { get; set; }
}
}

Expand Down
2 changes: 1 addition & 1 deletion HyPlayer.NeteaseApi/ApiContracts/Artist/ArtistSongsApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Artist;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;
using HyPlayer.NeteaseApi.Bases.WeApiContractBases;

namespace HyPlayer.NeteaseApi.ApiContracts
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Artist;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down
4 changes: 2 additions & 2 deletions HyPlayer.NeteaseApi/ApiContracts/Artist/ArtistVideoApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Artist;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json;
using System.Text.Json.Serialization;
Expand Down Expand Up @@ -40,7 +40,7 @@ public override Task MapRequest(ApiHandlerOption option)
ArtistId = Request.ArtistId,
Tab = Request.Tab,
Order = Request.Order,
Page = JsonSerializer.Serialize(page)
Page = JsonSerializer.Serialize(page, ApiHandlerOption.JsonSerializerOptionsOnlyTypeInfo)
};
}

Expand Down
2 changes: 1 addition & 1 deletion HyPlayer.NeteaseApi/ApiContracts/Cloud/CloudDeleteApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Cloud;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using System.Text.Json.Serialization;

namespace HyPlayer.NeteaseApi.ApiContracts
Expand Down
2 changes: 1 addition & 1 deletion HyPlayer.NeteaseApi/ApiContracts/Cloud/CloudGetApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Cloud;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down
2 changes: 1 addition & 1 deletion HyPlayer.NeteaseApi/ApiContracts/Cloud/CloudPubApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Cloud;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down
2 changes: 1 addition & 1 deletion HyPlayer.NeteaseApi/ApiContracts/Cloud/CloudUploadCheck.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Cloud;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using System.Text.Json.Serialization;

namespace HyPlayer.NeteaseApi.ApiContracts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Cloud;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using System.Text.Json.Serialization;

namespace HyPlayer.NeteaseApi.ApiContracts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Cloud;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Cloud;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.RawApiContractBases;
using System.Text.Json.Serialization;

namespace HyPlayer.NeteaseApi.ApiContracts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Cloud;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.RawApiContractBases;
using System.Text.Json.Serialization;

namespace HyPlayer.NeteaseApi.ApiContracts
Expand Down
2 changes: 1 addition & 1 deletion HyPlayer.NeteaseApi/ApiContracts/Cloud/UserCloudApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Cloud;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down
8 changes: 6 additions & 2 deletions HyPlayer.NeteaseApi/ApiContracts/Cloud/UserCloudDelete.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Cloud;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using System.Text.Json.Serialization;

namespace HyPlayer.NeteaseApi.ApiContracts
Expand All @@ -16,7 +16,7 @@ public static partial class NeteaseApis

namespace HyPlayer.NeteaseApi.ApiContracts.Cloud
{
public class UserCloudDeleteApi : EApiContractBase<IdOrIdListListRequest, UserCloudDeleteResponse, ErrorResultBase
public class UserCloudDeleteApi : EApiContractBase<UserCloudDeleteRequest,UserCloudDeleteResponse, ErrorResultBase
, UserCloudDeleteActualRequest>
{
public override string IdentifyRoute => "/user/cloud/del";
Expand All @@ -36,6 +36,10 @@ public override Task MapRequest(ApiHandlerOption option)
public override string ApiPath { get; protected set; } = "/api/cloud/del";

}

public class UserCloudDeleteRequest : IdOrIdListListRequest
{
}

public class UserCloudDeleteResponse : CodedResponseBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Comment;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Extensions;
using HyPlayer.NeteaseApi.Models;
using HyPlayer.NeteaseApi.Models.ResponseModels;
Expand Down
1 change: 1 addition & 0 deletions HyPlayer.NeteaseApi/ApiContracts/Comment/CommentLikeApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using HyPlayer.NeteaseApi.Extensions;
using HyPlayer.NeteaseApi.Models;
using System.Text.Json.Serialization;
using HyPlayer.NeteaseApi.Bases.WeApiContractBases;

namespace HyPlayer.NeteaseApi.ApiContracts
{
Expand Down
2 changes: 1 addition & 1 deletion HyPlayer.NeteaseApi/ApiContracts/Comment/CommentsApi.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.Comment;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Extensions;
using HyPlayer.NeteaseApi.Models;
using HyPlayer.NeteaseApi.Models.ResponseModels;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.DjChannel;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using HyPlayer.NeteaseApi.ApiContracts.DjChannel;
using HyPlayer.NeteaseApi.Bases;
using HyPlayer.NeteaseApi.Bases.ApiContractBases;
using HyPlayer.NeteaseApi.Bases.EApiContractBases;
using HyPlayer.NeteaseApi.Models.ResponseModels;
using System.Text.Json.Serialization;

Expand Down
Loading
Loading