Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit a881b6d

Browse files
committed
mod: 尝试亮度库修复
1 parent f9d5cf9 commit a881b6d

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

lib/http/api.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Api {
2424

2525
// 字幕
2626
// aid, cid
27-
static const String subtitleUrl = '/x/player/wbi/v2';
27+
static const String videoMetaInfo = '/x/player/wbi/v2';
2828

2929
// 视频详情
3030
// 竖屏 https://api.bilibili.com/x/web-interface/view?aid=527403921

lib/http/video.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,10 +668,10 @@ class VideoHttp {
668668
}
669669
}
670670

671-
static Future subtitlesJson(
671+
static Future videoMetaInfo(
672672
{String? aid, String? bvid, required int cid}) async {
673673
assert(aid != null || bvid != null);
674-
var res = await Request().get(Api.subtitleUrl, data: {
674+
var res = await Request().get(Api.videoMetaInfo, data: {
675675
if (aid != null) 'aid': aid,
676676
if (bvid != null) 'bvid': bvid,
677677
'cid': cid,

lib/pages/setting/play_setting.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ class _PlaySettingState extends State<PlaySetting> {
306306
leading: Icon(Icons.brightness_6_outlined),
307307
setKey: SettingBoxKey.setSystemBrightness,
308308
defaultVal: false,
309+
needReboot: true,
309310
),
310311
const SetSwitchItem(
311312
title: '后台音频服务',

lib/plugin/pl_player/controller.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ class PlPlayerController {
565565
}
566566
await _initializePlayer(seekTo: seekTo);
567567
if (videoType.value != 'live' && _cid != 0) {
568-
refreshSubtitles().then((_) {
568+
refreshVideoMetaInfo().then((_) {
569569
chooseSubtitle();
570570
});
571571
}
@@ -1633,11 +1633,11 @@ class PlPlayerController {
16331633
}
16341634
}
16351635

1636-
Future refreshSubtitles() async {
1636+
Future refreshVideoMetaInfo() async {
16371637
_vttSubtitles.clear();
1638-
Map res = await VideoHttp.subtitlesJson(bvid: _bvid, cid: _cid);
1638+
Map res = await VideoHttp.videoMetaInfo(bvid: _bvid, cid: _cid);
16391639
if (!res["status"]) {
1640-
SmartDialog.showToast('查询字幕错误,${res["msg"]}');
1640+
SmartDialog.showToast('查询视频元信息(字幕、防挡、章节等)错误,${res["msg"]}');
16411641
}
16421642
if (res["data"].length == 0) {
16431643
return;

pubspec.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,23 @@ dependency_overrides:
177177
# ref: main
178178
fading_edge_scrollview: ^4.1.1
179179
rxdart: ^0.28.0
180-
screen_brightness: ^2.0.1
180+
screen_brightness:
181+
git:
182+
url: https://github.com/aaassseee/screen_brightness.git
183+
ref: develop
184+
path: screen_brightness
185+
186+
screen_brightness_android:
187+
git:
188+
url: https://github.com/aaassseee/screen_brightness.git
189+
ref: develop
190+
path: screen_brightness_android
191+
192+
screen_brightness_ios:
193+
git:
194+
url: https://github.com/aaassseee/screen_brightness.git
195+
ref: develop
196+
path: screen_brightness_ios
181197
# media_kit:
182198
# git:
183199
# url: https://github.com/media-kit/media-kit.git

0 commit comments

Comments
 (0)