mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: custom enable sponsor block, def: false
This commit is contained in:
@@ -139,6 +139,13 @@ class _ExtraSettingState extends State<ExtraSetting> {
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
const SetSwitchItem(
|
||||
title: 'Sponsor Block',
|
||||
subTitle: '跳过赞助商广告',
|
||||
leading: Icon(Icons.block),
|
||||
setKey: SettingBoxKey.enableSponsorBlock,
|
||||
defaultVal: false,
|
||||
),
|
||||
Obx(
|
||||
() => ListTile(
|
||||
enableFeedback: true,
|
||||
|
||||
@@ -151,7 +151,9 @@ class VideoDetailController extends GetxController
|
||||
cacheAudioQa = setting.get(SettingBoxKey.defaultAudioQa,
|
||||
defaultValue: AudioQuality.hiRes.code);
|
||||
oid.value = IdUtils.bv2av(Get.parameters['bvid']!);
|
||||
_sponsorBlock();
|
||||
if (setting.get(SettingBoxKey.enableSponsorBlock, defaultValue: false)) {
|
||||
_sponsorBlock();
|
||||
}
|
||||
}
|
||||
|
||||
List? _segmentList;
|
||||
|
||||
@@ -188,6 +188,7 @@ class SettingBoxKey {
|
||||
enableAi = 'enableAi',
|
||||
disableLikeMsg = 'disableLikeMsg',
|
||||
defaultHomePage = 'defaultHomePage',
|
||||
enableSponsorBlock = 'enableSponsorBlock',
|
||||
|
||||
// 弹幕相关设置 权重(云屏蔽) 屏蔽类型 显示区域 透明度 字体大小 弹幕时间 描边粗细 字体粗细
|
||||
danmakuWeight = 'danmakuWeight',
|
||||
|
||||
Reference in New Issue
Block a user