-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a98c86
commit 6c52b01
Showing
14 changed files
with
133 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
group=online.bingiz.bilibili.video | ||
version=1.4.3 | ||
version=1.4.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/kotlin/online/bingiz/bilibili/video/internal/handler/ApiType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package online.bingiz.bilibili.video.internal.handler | ||
|
||
/** | ||
* Api type | ||
* | ||
* | ||
* @constructor Create empty Api type | ||
*/ | ||
enum class ApiType(val apiHandler: ApiHandler) { | ||
COINS(CoinsHandler()), | ||
FAVOURED(FavouredHandler()), | ||
FOLLOWING(FollowingHandler()), | ||
LIKE(LikeHandler()); | ||
|
||
companion object { | ||
/** | ||
* Build handler | ||
* 构建处理器依据指定顺序 | ||
* | ||
* @param apiType | ||
* @return | ||
*/ | ||
fun buildHandler(vararg apiType: ApiType): ApiHandler { | ||
requireNotNull(apiType) { | ||
error("至少需要一个 ApiType 来生成处理程序") | ||
} | ||
for (i in 0 until apiType.size - 1) { | ||
apiType[i].apiHandler.setNextHandler(apiType[i + 1].apiHandler) | ||
} | ||
return apiType[0].apiHandler | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/kotlin/online/bingiz/bilibili/video/internal/helper/StatusHelper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package online.bingiz.bilibili.video.internal.helper | ||
|
||
|
||
var debugStatus: Boolean = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,6 @@ cooldown: 60 | |
# 是否需要关注 | ||
# * 本项为实验项目,可能存在不稳定的情况 | ||
needFollow: false | ||
|
||
# 调试模式,用于诊断一些问题 | ||
debug: false |