Skip to content

Commit

Permalink
Show cache button for thai bangumi
Browse files Browse the repository at this point in the history
Fix #1334
  • Loading branch information
yujincheng08 committed Jan 11, 2024
1 parent e3508fc commit 1573deb
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions app/src/main/java/me/iacn/biliroaming/hook/BangumiSeasonHook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,7 @@ class BangumiSeasonHook(classLoader: ClassLoader) : BaseHook(classLoader) {
}
}
}
addKingPosition()
}
}
tabModule += tabModule {
Expand Down Expand Up @@ -1300,6 +1301,29 @@ class BangumiSeasonHook(classLoader: ClassLoader) : BaseHook(classLoader) {
}
}

private fun IntroductionTabKt.Dsl.addKingPosition() {
modules += module {
type = ModuleType.KING_POSITION
kingPosition = kingPosition {
kingPos += kingPos {
type = KingPos.KingPositionType.LIKE
}
kingPos += kingPos {
type = KingPos.KingPositionType.COIN
}
kingPos += kingPos {
type = KingPos.KingPositionType.FAV
}
kingPos += kingPos {
type = KingPos.KingPositionType.CACHE
}
kingPos += kingPos {
type = KingPos.KingPositionType.SHARE
}
}
}
}

private fun fixViewProto(req: ViewUniteReq): ViewUniteReply? {
Log.toast("发现东南亚区域番剧,尝试解锁……")
val reqEpId = req.extraContentMap["ep_id"]?.also {
Expand Down Expand Up @@ -1359,6 +1383,7 @@ class BangumiSeasonHook(classLoader: ClassLoader) : BaseHook(classLoader) {
}
}
}
addKingPosition()

// seasons
seasonInfo.optJSONObject("series")?.optJSONArray("seasons")?.takeIf { it.length() > 0 }
Expand Down

0 comments on commit 1573deb

Please sign in to comment.