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

[pull] master from yujincheng08:master #49

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7d07474
feat: KillDelayBootHook (#1553)
CodePwn2021 Nov 12, 2024
845ceff
fix: crash when searching sensitive words (#1551)
CodePwn2021 Nov 12, 2024
88bb21c
fix: comment copy on play v3.19.1+ and v7.77.0+ (#1537)
Aiden2014 Nov 12, 2024
e2bc2c3
build(deps): bump the maven-dependencies group across 1 directory wit…
dependabot[bot] Nov 12, 2024
d7f0d82
fix: initHookInfo find biliAccounts class failed on 8.18.0+ (#1555)
CodePwn2021 Nov 12, 2024
8c7fd1a
fix: home tab filter adds rules for bangumi_v2 and cinema_v2 (#1557)
CodePwn2021 Nov 13, 2024
2ee0be6
fix: PegasusHook for v8.17.0+ (#1561)
CodePwn2021 Nov 15, 2024
18116c7
fix: BangumiPlayUrlHook, BangumiSeasonHook, ProtoBufHook for v8.17.0+…
CodePwn2021 Nov 16, 2024
e45e4d5
feat: PegasusHook support viewUnite (#1564)
CodePwn2021 Nov 17, 2024
0d39ff1
fix: use viewUnite for replaceStoryVideo (#1566)
CodePwn2021 Nov 17, 2024
233a877
feat: search filter add remove relate promote (#1567)
CodePwn2021 Nov 18, 2024
05e0848
refactor: optimize code (#1569)
CodePwn2021 Nov 19, 2024
2879601
fix: more NoSuchMethodError (#1570)
CodePwn2021 Nov 19, 2024
d7e2a55
fix: incorrect method name (#1571)
CodePwn2021 Nov 20, 2024
ab8bf49
build(deps): bump the maven-dependencies group with 5 updates (#1575)
dependabot[bot] Nov 28, 2024
1e00861
build(deps): bump the maven-dependencies group across 1 directory wit…
dependabot[bot] Dec 5, 2024
1287ece
fix: custom theme & video quality & some hookinfo (#1589)
TinyHai Dec 28, 2024
90ccf96
fix: found wrong hookinfo of okhttp (#1591)
TinyHai Dec 29, 2024
8a10ca7
fix: video description can't be freely copied
TinyHai Dec 31, 2024
5c36575
fix: prefer video tab
TinyHai Dec 31, 2024
59e1d32
fix: allow download
TinyHai Dec 31, 2024
519ee2e
fix: replace b23.tv with bili2233.cn (#1598)
HinataKato Jan 1, 2025
28a4449
build(deps): bump the maven-dependencies group across 1 directory wit…
dependabot[bot] Jan 2, 2025
dde92b1
fix: force media notification styles follow the system
TinyHai Jan 2, 2025
d7ab210
fix: purify dyn video page
TinyHai Jan 2, 2025
fd11a0f
clean unused hooks in DynamicHook
TinyHai Jan 2, 2025
4c328a6
Keep b23.tv compatibility
yujincheng08 Jan 3, 2025
e065e7c
fix: show avid (#1601)
TinyHai Jan 3, 2025
af10950
feat: separately purify Live and UP in dyn all page (#1602)
TinyHai Jan 3, 2025
89c0537
fix: change the description for purify share (#1603)
HinataKato Jan 3, 2025
9dfda93
fix: crash caused by unlocking area in some cases (#1604)
TinyHai Jan 4, 2025
a222172
fix: video quality for v8.9.0+ (#1605)
TinyHai Jan 6, 2025
9ed39c2
fix: auto like
TinyHai Jan 7, 2025
3adab00
fix: remove relate video
TinyHai Jan 7, 2025
6702d38
fix: optimize the way to find selectQuality for play ver. (#1607)
TinyHai Jan 8, 2025
6ff4ddb
fix: find selectQuality for hd ver.
TinyHai Jan 8, 2025
5e46c07
fix: disable custom theme for hd ver.
TinyHai Jan 8, 2025
1f2f8bf
fix: disable try vip quality for v7.50.0+ (#1609)
TinyHai Jan 9, 2025
c0f074f
fix: crash in some cases (#1612)
TinyHai Jan 12, 2025
d0859f0
Upgrade Gradle
yujincheng08 Jan 12, 2025
5552175
build(deps): bump the maven-dependencies group with 4 updates (#1610)
dependabot[bot] Jan 12, 2025
e888312
feat: live quality (#1615)
TinyHai Jan 17, 2025
c3b2acc
fix: refine live quality (#1617)
TinyHai Jan 18, 2025
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
Prev Previous commit
Next Next commit
fix: replace b23.tv with bili2233.cn (yujincheng08#1598)
修复因链接更换导致的净化失效 yujincheng08#1597
  • Loading branch information
HinataKato authored Jan 1, 2025
commit 519ee2e2068964b1ce68521fb4ca572c6bfa89cf
6 changes: 3 additions & 3 deletions app/src/main/java/me/iacn/biliroaming/hook/ShareHook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import java.net.HttpURLConnection
import java.net.URL

class ShareHook(classLoader: ClassLoader) : BaseHook(classLoader) {
private val contentUrlPattern = Regex("""[\s\S]*(https?://b23\.tv/\S*)$""")
private val contentUrlPattern = Regex("""[\s\S]*(https?://bili2233\.cn/\S*)$""")

private fun String.resolveB23URL(): String {
val conn = URL(this).openConnection() as HttpURLConnection
Expand Down Expand Up @@ -66,7 +66,7 @@ class ShareHook(classLoader: ClassLoader) : BaseHook(classLoader) {
if (purifyShareEnabled) {
hookAfterMethod("getLink") { param ->
(param.result as? String)?.takeIf {
it.startsWith("https://b23.tv") || it.startsWith("http://b23.tv")
it.startsWith("https://bili2233.cn") || it.startsWith("http://bili2233.cn")
}?.let {
val targetUrl = Uri.parse(it).buildUpon().query("").build().toString()
param.result = targetUrl.resolveB23URL().also { r -> param.thisObject.setObjectField("link", r) }
Expand All @@ -79,7 +79,7 @@ class ShareHook(classLoader: ClassLoader) : BaseHook(classLoader) {
}?.let { contentUrl ->
val resolvedUrl = (param.thisObject.getObjectField("link")?.let { it as String } ?: contentUrl)
.let {
if (it.startsWith("https://b23.tv") || it.startsWith("http://b23.tv"))
if (it.startsWith("https://bili2233.cn") || it.startsWith("http://bili2233.cn"))
it.resolveB23URL()
else it
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<string name="drawer_style_title">修改我的頁面樣式</string>
<string name="drawer_style_summary">開啟改為列表,關閉改為按鈕</string>
<string name="purify_share_title">淨化分享</string>
<string name="purify_share_summary">把分享連結中的 b23.tv 短連結換成正常連結</string>
<string name="purify_share_summary">把分享連結中的 bili2233.cn 短連結換成正常連結</string>
<string name="custom_link_title">開啟自訂連結</string>
<string name="custom_link_summary">僅支援 bilibili:// 開頭的格式</string>
<string name="add_custom_button_title">在【我的】頁面新增自訂按鈕</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<string name="drawer_style_title">修改我的页面样式</string>
<string name="drawer_style_summary">开启改为列表,关闭改为按钮</string>
<string name="purify_share_title">净化分享</string>
<string name="purify_share_summary">把分享链接中的 b23.tv 短链接换成正常链接</string>
<string name="purify_share_summary">把分享链接中的 bili2233.cn 短链接换成正常链接</string>
<string name="custom_link_title">开启自定义链接</string>
<string name="custom_link_summary">仅支持 bilibili:// 开头的格式</string>
<string name="add_custom_button_title">在【我的】页面添加自定义按钮</string>
Expand Down