Skip to content
Open
Changes from 3 commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
88086fe
更新依赖,提升 minSdkVersion
aaa1115910 Jul 26, 2025
4a515be
修复动态无法加载
aaa1115910 Jul 26, 2025
a8c74e3
修复评论无法加载
aaa1115910 Jul 26, 2025
593517c
更新设置样式
aaa1115910 Aug 2, 2025
21c967c
修复 @Preview 中含有 Prefs 相关代码就无法正常预览
aaa1115910 Aug 2, 2025
4d54b59
修复动态内容可能无法显示
aaa1115910 Aug 5, 2025
763c744
移除设置页切换内容时的回弹动画
aaa1115910 Aug 5, 2025
86c7344
将 bili-api-grpc 模块移动到 bili-api 模块内
aaa1115910 Aug 14, 2025
cef3e90
修复充电视频导致动态无法加载
aaa1115910 Aug 14, 2025
921bc74
优化动态列表中动态视频的标题显示
aaa1115910 Aug 14, 2025
5340120
修复移动端可能无法从动态播放视频
aaa1115910 Aug 14, 2025
bfb1d84
移除错误的配置
aaa1115910 Aug 24, 2025
61163a1
Revert "移除错误的配置"
aaa1115910 Aug 30, 2025
f5d2dbb
回退 ktor 版本
aaa1115910 Aug 30, 2025
cc59f1e
忽略不支持的动态类型
aaa1115910 Aug 31, 2025
6910d7f
移动端添加基础的搜索功能
aaa1115910 Sep 14, 2025
04c77a6
修复无法获取字幕(web 接口)
aaa1115910 Sep 14, 2025
bbb43d4
修复无法加载部分字幕
aaa1115910 Sep 17, 2025
4d126f2
修复异形屏设备菜单面板的错误内边距
aaa1115910 Sep 17, 2025
7d3e092
修复无法加载用户空间投稿视频列表
aaa1115910 Oct 8, 2025
b6b5586
修复点击视频详情页点击封面不会继续播放分p
aaa1115910 Oct 8, 2025
b92ccda
修复 PGC 详情页不显示非正片内容
aaa1115910 Oct 8, 2025
226883a
使用从 com.android.settings(36) 中反编译出来的二维码组件
aaa1115910 Oct 18, 2025
51e79f5
修复动态无法加载
aaa1115910 Oct 31, 2025
04f94ff
设置 testOptions.targetSdk 避免无法运行 Preview
aaa1115910 Oct 31, 2025
cb8e90c
更新播放进度条样式
aaa1115910 Oct 31, 2025
a91cc55
添加 material symbols 图标
aaa1115910 Nov 4, 2025
fe28272
更新播放器样式
aaa1115910 Nov 4, 2025
8db5ca5
新增播放模式选项
aaa1115910 Nov 4, 2025
2dba26c
指定 workflow JDK 版本 21
aaa1115910 Nov 4, 2025
15c712b
修复无法加载用户空间投稿视频列表
aaa1115910 Nov 4, 2025
16f3ddb
优化 Material3 QRCode 组件 (#274)
ldm0206 Nov 28, 2025
876e214
修复 request was banned 请求错误 (#276)
fantasytyx Nov 28, 2025
f83c59a
优化播放进度条
aaa1115910 Nov 28, 2025
4eb8216
修复低版本 Android 无法正确显示二维码
aaa1115910 Dec 4, 2025
0e454c0
修复低版本 Android 显示二维码闪退 (#284)
chengoak Dec 8, 2025
9be90bc
Remove mainland China detection and allow unrestricted access
web-flow Jan 18, 2026
f337efd
Update repository condition for build-alpha job
Colorful-glassblock Jan 18, 2026
4ce6222
Update repository condition in release workflow
Colorful-glassblock Jan 18, 2026
06a534f
Update repository condition in features.yml
Colorful-glassblock Jan 18, 2026
5cc55f4
Change workflow OS from macOS to Ubuntu and fix base64 decode command
web-flow Jan 18, 2026
42a9279
Update usage notes for BVCN in China
Colorful-glassblock Jan 23, 2026
2b88a8b
修复动态无法加载
aaa1115910 Jul 26, 2025
6c98030
修复评论无法加载
aaa1115910 Jul 26, 2025
c7b50d2
更新设置样式
aaa1115910 Aug 2, 2025
bbb6560
修复 @Preview 中含有 Prefs 相关代码就无法正常预览
aaa1115910 Aug 2, 2025
3ec85fb
修复动态内容可能无法显示
aaa1115910 Aug 5, 2025
73ad821
移除设置页切换内容时的回弹动画
aaa1115910 Aug 5, 2025
3e59e37
将 bili-api-grpc 模块移动到 bili-api 模块内
aaa1115910 Aug 14, 2025
64627af
修复充电视频导致动态无法加载
aaa1115910 Aug 14, 2025
8691ef1
优化动态列表中动态视频的标题显示
aaa1115910 Aug 14, 2025
c97e7f6
修复移动端可能无法从动态播放视频
aaa1115910 Aug 14, 2025
203c885
移除错误的配置
aaa1115910 Aug 24, 2025
a970108
Revert "移除错误的配置"
aaa1115910 Aug 30, 2025
187bede
回退 ktor 版本
aaa1115910 Aug 30, 2025
1e5aba6
忽略不支持的动态类型
aaa1115910 Aug 31, 2025
5304d9c
移动端添加基础的搜索功能
aaa1115910 Sep 14, 2025
1c7925c
修复无法获取字幕(web 接口)
aaa1115910 Sep 14, 2025
31b3b65
修复无法加载部分字幕
aaa1115910 Sep 17, 2025
1ebf4fa
修复异形屏设备菜单面板的错误内边距
aaa1115910 Sep 17, 2025
61c6e0a
修复无法加载用户空间投稿视频列表
aaa1115910 Oct 8, 2025
657c0a6
修复点击视频详情页点击封面不会继续播放分p
aaa1115910 Oct 8, 2025
72327c2
修复 PGC 详情页不显示非正片内容
aaa1115910 Oct 8, 2025
6bec1f7
使用从 com.android.settings(36) 中反编译出来的二维码组件
aaa1115910 Oct 18, 2025
2282e9f
修复动态无法加载
aaa1115910 Oct 31, 2025
b6c4e93
设置 testOptions.targetSdk 避免无法运行 Preview
aaa1115910 Oct 31, 2025
5faddee
更新播放进度条样式
aaa1115910 Oct 31, 2025
8942447
添加 material symbols 图标
aaa1115910 Nov 4, 2025
ef37aad
更新播放器样式
aaa1115910 Nov 4, 2025
9226684
新增播放模式选项
aaa1115910 Nov 4, 2025
ed210cd
修复无法加载用户空间投稿视频列表
aaa1115910 Nov 4, 2025
f18acad
优化 Material3 QRCode 组件 (#274)
ldm0206 Nov 28, 2025
e447630
修复 request was banned 请求错误 (#276)
fantasytyx Nov 28, 2025
0142d35
优化播放进度条
aaa1115910 Nov 28, 2025
c59cbf7
修复低版本 Android 无法正确显示二维码
aaa1115910 Dec 4, 2025
a10dbf9
修复低版本 Android 显示二维码闪退 (#284)
chengoak Dec 8, 2025
34e2952
指定 workflow JDK 版本 21
web-flow Jan 23, 2026
c2a19a5
Merge branch 'aaa1115910:develop' into develop
Colorful-glassblock Jan 24, 2026
ea60d8d
添加lastAndroid5 build workflow
web-flow Jan 25, 2026
5d214b7
Merge pull request #2 from Colorful-glassblock/add-lastAndroid5-workflow
Colorful-glassblock Jan 25, 2026
8f902fe
Change repository references and project name in README
Colorful-glassblock Jan 29, 2026
d87d921
Merge pull request #10 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Jan 29, 2026
cbe2fbd
Update README with usage warnings and project status
Colorful-glassblock Mar 7, 2026
a68cdd9
Merge pull request #22 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 7, 2026
96d8f3b
Modify bug report template with required labels
Colorful-glassblock Mar 7, 2026
23d7ab9
Merge pull request #23 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 7, 2026
c1c9844
Update bug report template with improved clarity
Colorful-glassblock Mar 7, 2026
65d4b16
Merge pull request #24 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 7, 2026
88abb48
Modify issue template confirmation label wording
Colorful-glassblock Mar 7, 2026
8939d02
Merge pull request #25 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 7, 2026
ac8db45
Revise bug report label for clarity
Colorful-glassblock Mar 7, 2026
e7d18f7
Merge pull request #26 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 7, 2026
ae9f7f6
Enhance issue workflow for title and content validation
Colorful-glassblock Mar 7, 2026
ba30d90
Merge pull request #27 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 7, 2026
0e515f5
Revise version options in bug report template
Colorful-glassblock Mar 8, 2026
2bc0faa
Merge pull request #29 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 8, 2026
16a8f1c
Update issue workflow for bug report validation
Colorful-glassblock Mar 8, 2026
883731f
Merge pull request #30 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 8, 2026
243d218
Enhance bug report validation and outputs
Colorful-glassblock Mar 8, 2026
f239fcb
Merge pull request #33 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 8, 2026
441798c
Refactor violation checks and improve messages
Colorful-glassblock Mar 8, 2026
a26343d
Merge pull request #36 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 8, 2026
9c60da3
Add labels to bug report template
Colorful-glassblock Mar 8, 2026
38fa86b
Merge pull request #37 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 8, 2026
4c3d0e9
Fix formatting in bug_report.yml
Colorful-glassblock Mar 8, 2026
ee20d06
Merge pull request #38 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 8, 2026
cee7d86
Update auto_close_issues.yml
Colorful-glassblock Mar 8, 2026
12e5fff
Merge pull request #40 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 8, 2026
6a0d0c2
Refactor issue validation checks for clarity
Colorful-glassblock Mar 8, 2026
a218ab3
Merge pull request #42 from Colorful-glassblock/Colorful-glassblock-p…
Colorful-glassblock Mar 8, 2026
b0d1781
fix: prevent ANR during playback (develop)
May 3, 2026
a6cc172
feat: add software video renderer option
May 3, 2026
b376d38
fix: fix switchPreference signature for develop branch
May 3, 2026
0775014
fix: detect TV device and redirect to TV launcher
May 3, 2026
001c760
fix: QR code ANR and memory leak
May 4, 2026
1491e27
opt: optimize QR code memory usage
May 4, 2026
3d96fe4
opt: optimize danmaku loading with segment-based approach
May 4, 2026
0a09885
fix: update github api endpoint to use forked repo\n\n- Change OWNER …
May 5, 2026
7a42add
fix: update github api endpoint to use main repo\n\n- Change OWNER fr…
May 5, 2026
5f20f82
fix: update github api endpoint to use main repo for lastAndroid5\n\n…
May 5, 2026
67cbe0c
fix: filter releases by current branch\n\n- Add CURRENT_BRANCH consta…
May 5, 2026
15ad5bb
fix: filter releases by current branch for lastAndroid5
May 5, 2026
11b3005
fix: TV device can access all releases\n\n- Add isTvDevice check\n- T…
May 5, 2026
7b010bb
fix: resolve merge conflicts
May 5, 2026
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
32 changes: 25 additions & 7 deletions app/shared/src/main/kotlin/dev/aaa1115910/bv/network/GithubApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,20 @@ import java.io.File

object GithubApi {
private var endPoint = "api.github.com"
private const val OWNER = "aaa1115910"
private const val REPO = "bv"
private const val OWNER = "Colorful-glassblock"
private const val REPO = "bvcn"
// 当前分支名称,用于过滤对应分支的 release
private const val CURRENT_BRANCH = "lastAndroid5"
// 电视端特殊处理:如果在 TV 上运行,允许获取所有 release(因为 TV 可能需要更多版本)
private val isTvDevice: Boolean
get() {
return try {
val uiModeManager = LocalContext.current.getSystemService(Context.UI_MODE_SERVICE) as UiModeManager
uiModeManager.currentModeType == Configuration.UI_MODE_TYPE_TELEVISION
} catch (e: Exception) {
false
}

private lateinit var client: HttpClient
private val json = Json {
coerceInputValues = true
Expand Down Expand Up @@ -74,16 +86,22 @@ object GithubApi {
parameter("page", page)
}.bodyAsText()
checkErrorMessage(response)
return json.decodeFromString<List<Release>>(response)
val allReleases = json.decodeFromString<List<Release>>(response)
// 电视端特殊处理:如果在 TV 上运行,允许获取所有 release
if (isTvDevice) {
return allReleases
}
// 其他设备:过滤只匹配当前分支的 release
return allReleases.filter { it.targetCommitish == CURRENT_BRANCH }
}

private suspend fun getLatestRelease(
owner: String = OWNER,
repo: String = REPO
): Release {
val response = client.get("repos/$owner/$repo/releases/latest").bodyAsText()
checkErrorMessage(response)
return json.decodeFromString<Release>(response)
val releases = getReleases(owner = owner, repo = repo, pageSize = 1)
return releases.firstOrNull { !it.isPreRelease }
?: throw IllegalStateException("No release found for branch $CURRENT_BRANCH")
}

suspend fun getLatestPreReleaseBuild(): Release {
Expand All @@ -95,7 +113,7 @@ object GithubApi {
release = releases.firstOrNull { it.isPreRelease }
page++
}
return release ?: throw IllegalStateException("No pre-release found")
return release ?: throw IllegalStateException("No pre-release found for branch $CURRENT_BRANCH")
}

suspend fun getLatestReleaseBuild(): Release = getLatestRelease()
Expand Down