Skip to content

Commit

Permalink
Merge pull request #815 from RayWangQvQ/develop
Browse files Browse the repository at this point in the history
Release  2.1.3
  • Loading branch information
RayWangQvQ authored Dec 24, 2024
2 parents 2b47c81 + a0069d8 commit 62d6f18
Show file tree
Hide file tree
Showing 28 changed files with 1,031 additions and 980 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,7 @@ krew/pkg/utils/fixtures
kustomization.yaml

# cookie config
**/Ray.BiliBiliTool.Console/cookies.json
**/Ray.BiliBiliTool.Console/cookies.json

# ut
coveragereport
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.1.3
- Code refactory
- Fix[#791]:修复VipBigPoint任务异常导致终止的问题
## 2.1.2
- Feature: enhancement CICD scripts
- Fix[#728]: compatible with qinglong history versions
Expand Down
11 changes: 10 additions & 1 deletion Ray.BiliBiliTool.sln
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
.gitignore = .gitignore
CHANGELOG.md = CHANGELOG.md
clean.cmd = clean.cmd
common.props = common.props
Dockerfile = Dockerfile
LICENSE = LICENSE
Expand Down Expand Up @@ -139,6 +138,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InfrastructureTest", "test\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ray.BiliBiliTool.Agent.FunctionalTests", "test\Ray.BiliBiliTool.Agent.FunctionalTests\Ray.BiliBiliTool.Agent.FunctionalTests.csproj", "{16F315CF-056A-4B08-8C3C-A3177EA3CBB9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{2B5FD099-CC28-4FBC-9F20-F20300C5DFD2}"
ProjectSection(SolutionItems) = preProject
scripts\clean.cmd = scripts\clean.cmd
scripts\publish.bat = scripts\publish.bat
scripts\publish.ps1 = scripts\publish.ps1
scripts\publish.sh = scripts\publish.sh
scripts\ut.ps1 = scripts\ut.ps1
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -233,6 +241,7 @@ Global
{26B21C30-7358-4E7B-A73E-2272F10A6CA8} = {E9BDDCBE-A57D-4E3B-8252-708088386ADF}
{90C1DB73-B3DB-4BE5-AD1A-5248FE47860E} = {E9BDDCBE-A57D-4E3B-8252-708088386ADF}
{16F315CF-056A-4B08-8C3C-A3177EA3CBB9} = {E9BDDCBE-A57D-4E3B-8252-708088386ADF}
{2B5FD099-CC28-4FBC-9F20-F20300C5DFD2} = {F3DE0D72-426B-4AD9-B3ED-3343CF4223F1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {197319DA-1148-4A99-847C-8B270B6A29AB}
Expand Down
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Authors>Ray</Authors>
<Version>2.1.2</Version>
<Version>2.1.3</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion docs/runInLocal.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ P.S.这里的运行环境指的是 `.NET Runtime 6.0.0` ,安装方法可详见
```
wget https://github.com/RayWangQvQ/BiliBiliToolPro/releases/download/0.3.1/bilibili-tool-pro-v0.3.1-linux-x64.zip
unzip bilibili-tool-pro-v0.3.1-linux-x64.zip
cd cd ./linux-x64/
cd ./linux-x64/
./Ray.BiliBiliTool.Console --runTasks=Login
```

Expand Down
19 changes: 19 additions & 0 deletions scripts/ut.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Set-Location ..

# 安装 ReportGenerator 工具
Write-Output "Installing ReportGenerator tool..."
dotnet tool install -g dotnet-reportgenerator-globaltool

# 运行单元测试并生成覆盖率报告
Write-Output "Running unit tests and generating coverage report..."
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./TestResults/coverage.opencover.xml

# 生成html报告
$coverageFiles = Get-ChildItem -Path . -Recurse -Filter "coverage.cobertura.xml"
$coverageFiles | ForEach-Object { Write-Output $_.FullName }
$reportPaths = ($coverageFiles | ForEach-Object { $_.FullName }) -join ";"
reportgenerator "-reports:$reportPaths" "-targetdir:coveragereport" -reporttypes:Html

# 检查生成的覆盖率报告文件是否存在
Write-Output "Coverage report generated successfully."
Start-Process "coveragereport/index.htm"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public class GetLiveRoomInfoResponse

public long Parent_area_id { get; set; }

public int Live_Status { get; set; }

public long Uid { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,32 @@ namespace Ray.BiliBiliTool.Agent.BiliBiliAgent.Dtos.Live
{
public class LikeLiveRoomRequest
{
public LikeLiveRoomRequest(long roomid, string csrf)
public LikeLiveRoomRequest(long roomid, string csrf, int clickTime, long anchorId, string uid)
{
Roomid = roomid;
Csrf= csrf;
Csrf = csrf;
Click_Time = clickTime;
Anchor_Id = anchorId;
Uid = uid;
}

public long Roomid { get; set; }

public string Csrf { get; set; }

public string Csrf_token => Csrf;
public string Csrf_Token => Csrf;

public int Click_Time { get; set; }

public long Anchor_Id { get; set; }

public string Uid { get; set; }


public string RawTextBuild()
{
return
$"click_time={Click_Time.ToString()}&room_id={Roomid.ToString()}&uid={Uid}&anchor_id={Anchor_Id}&csrf_token={Csrf_Token}&csrf={Csrf}";
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ public interface ILiveApi : IBiliBiliApi
/// <summary>
/// 点赞直播间
/// </summary>
[HttpPost("/xlive/web-ucenter/v1/interact/likeInteract")]
[HttpPost("/xlive/app-ucenter/v1/like_info_v3/like/likeReportV3")]
[Header("Referer", "https://live.bilibili.com/")]
[Header("Origin", "https://live.bilibili.com")]
Task<BiliApiResponse> LikeLiveRoom([FormContent] LikeLiveRoomRequest request);
}
Task<BiliApiResponse> LikeLiveRoom([RawFormContent] string request);
}
Loading

0 comments on commit 62d6f18

Please sign in to comment.