Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add CustomComicId and CustomEpId #562

Merged
merged 6 commits into from
Jun 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public interface IMangaApi : IBiliBiliApi
/// </summary>
/// <param name="platform"></param>
/// <returns></returns>
[HttpPost("/twirp/bookshelf.v1.Bookshelf/AddHistory?platform={platform}&comic_id=27355&ep_id=381662")]
Task<BiliApiResponse> ReadManga(string platform);
[HttpPost("/twirp/bookshelf.v1.Bookshelf/AddHistory?platform={platform}&comic_id={comic_id}&ep_id={ep_id}")]
Task<BiliApiResponse> ReadManga(string platform, int comic_id, int ep_id);
RayWangQvQ marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// 获取会员漫画奖励
Expand Down
9 changes: 9 additions & 0 deletions src/Ray.BiliBiliTool.Config/Options/DailyTaskOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ public string ChargeComment
/// </summary>
public string DevicePlatform { get; set; } = "android";

/// <summary>
/// 自定义漫画阅读 comic_id
/// </summary>
public int CustomComicId { get; set; } = 27355;
Initial-heart-1 marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// 自定义漫画阅读 ep_id
/// </summary>
public int CustomEpId { get; set; } = 381662;

public List<long> SupportUpIdList
{
Expand Down
4 changes: 3 additions & 1 deletion src/Ray.BiliBiliTool.Console/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"ChargeComment": "", //充电后留言
"DayOfReceiveVipPrivilege": 1, //每月几号自动领取会员权益的[-1,31],-1表示不指定,默认每月1号;0表示不自动领取
"DayOfExchangeSilver2Coin": 0, //每月几号执行银瓜子兑换硬币[-1,31],-1表示不指定,默认每月最后一天;-2表示每天;0表示不进行兑换
"DevicePlatform": "android" //执行客户端操作时的平台 [ios,android]
"DevicePlatform": "android", //执行客户端操作时的平台 [ios,android]
"CustomComicId": "27355", //自定义漫画阅读 comic_id,若不清楚含义请勿修改
Initial-heart-1 marked this conversation as resolved.
Show resolved Hide resolved
"CustomEpId": "381662" //自定义漫画阅读 ep_id,若不清楚含义请勿修改
},

"LiveLotteryTaskConfig": {
Expand Down
4 changes: 2 additions & 2 deletions src/Ray.BiliBiliTool.DomainService/MangaDomainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ public async Task MangaSign()
/// </summary>
public async Task MangaRead()
{
BiliApiResponse response = await _mangaApi.ReadManga(_dailyTaskOptions.DevicePlatform);
BiliApiResponse response = await _mangaApi.ReadManga(_dailyTaskOptions.DevicePlatform, _dailyTaskOptions.CustomComicId, _dailyTaskOptions.CustomEpId);
RayWangQvQ marked this conversation as resolved.
Show resolved Hide resolved

if (response.Code == 0)
{
_logger.LogInformation("【漫画阅读】成功, 阅读漫画为:堀与宫村");
_logger.LogInformation("【漫画阅读】成功");
}
else
{
Expand Down