mod: 提前关闭封面、点击小电视强制尝试播放

This commit is contained in:
orz12
2024-06-12 18:34:07 +08:00
parent cf725e39d4
commit 2035ae90f3
4 changed files with 29 additions and 8 deletions

View File

@@ -117,6 +117,7 @@ class VideoDetailController extends GetxController
length: 2, vsync: this, initialIndex: defaultShowComment ? 1 : 0);
autoPlay.value =
setting.get(SettingBoxKey.autoPlayEnable, defaultValue: true);
if (autoPlay.value) isShowCover.value = false;
enableHA.value = setting.get(SettingBoxKey.enableHA, defaultValue: true);
hwdec.value = setting.get(SettingBoxKey.hardwareDecoding,
defaultValue: Platform.isAndroid ? 'auto-safe' : 'auto');
@@ -319,8 +320,8 @@ class VideoDetailController extends GetxController
currentDecodeFormats = VideoDecodeFormatsCode.fromString('avc1')!;
currentVideoQa = VideoQualityCode.fromCode(data.quality!)!;
if (autoPlay.value) {
await playerInit();
isShowCover.value = false;
await playerInit();
}
return result;
}
@@ -421,8 +422,8 @@ class VideoDetailController extends GetxController
}
defaultST = Duration(milliseconds: data.lastPlayTime!);
if (autoPlay.value) {
await playerInit();
isShowCover.value = false;
await playerInit();
}
} else {
if (result['code'] == -404) {