* opt: danmaku weight

* opt: cache clean

* opt: level img

* opt: play icon

* opt: svg big-vip

* opt: webview ua

* opt: simple dialog

* feat: export vtt

* tweak

* opt: mapIndexed

* feat: more subtitle

* refa: settings page

* feat: codec list options

* drawPath

Signed-off-by: dom <githubaccount56556@proton.me>

* custom dialog option

Signed-off-by: dom <githubaccount56556@proton.me>

* update

Signed-off-by: dom <githubaccount56556@proton.me>

* Revert "drawPath"

This reverts commit e8a4b19f0f.

* opt: _initStreamIndex

* fix: avoid gap

* fix: scale [skip ci]

* fix: hide repost menu not login

* tweaks

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2026-06-26 02:51:41 +00:00
committed by GitHub
parent 3dee6a85e5
commit 9d94c72e95
96 changed files with 2268 additions and 2143 deletions

View File

@@ -1,5 +1,4 @@
import 'dart:io';
import 'dart:math' show pow;
import 'package:PiliPlus/common/widgets/gesture/horizontal_drag_gesture_recognizer.dart'
show deviceTouchSlop;
@@ -246,15 +245,33 @@ abstract final class Pref {
defaultValue: AudioQuality.k192.code,
);
static String get defaultDecode => _setting.get(
SettingBoxKey.defaultDecode,
defaultValue: VideoDecodeFormatType.AVC.codes.first,
);
static List<VideoDecodeFormatType> get preferCodecs {
// TODO: remove next 2 version
if (_setting.get('defaultDecode') case String codecStr) {
String? codecStr2 = _setting.get('secondDecode');
_setting.deleteAll(const ['defaultDecode', 'secondDecode']);
final codecs = [
VideoDecodeFormatType.values.firstWhere(
(i) => i.codes.contains(codecStr),
),
if (codecStr2 != null && codecStr2 != codecStr)
VideoDecodeFormatType.values.firstWhere(
(i) => i.codes.contains(codecStr2),
),
];
_setting.put(
SettingBoxKey.preferCodecs,
codecs.map((i) => i.name).toList(),
);
return codecs;
}
static String get secondDecode => _setting.get(
SettingBoxKey.secondDecode,
defaultValue: VideoDecodeFormatType.AV1.codes.first,
);
final codecs = _setting.get(SettingBoxKey.preferCodecs);
if (codecs is List && codecs.isNotEmpty) {
return codecs.map((i) => VideoDecodeFormatType.values.byName(i)).toList();
}
return const [];
}
static String get hardwareDecoding => _setting.get(
SettingBoxKey.hardwareDecoding,
@@ -598,7 +615,7 @@ abstract final class Pref {
_setting.get(SettingBoxKey.showPgcTimeline, defaultValue: true);
static num get maxCacheSize =>
_setting.get(SettingBoxKey.maxCacheSize) ?? pow(1024, 3);
_setting.get(SettingBoxKey.maxCacheSize) ?? 1 << 30;
static bool get optTabletNav =>
_setting.get(SettingBoxKey.optTabletNav, defaultValue: true);
@@ -717,9 +734,6 @@ abstract final class Pref {
!Platform.isIOS &&
_setting.get(SettingBoxKey.dynamicColor, defaultValue: true);
static bool get autoClearCache =>
_setting.get(SettingBoxKey.autoClearCache, defaultValue: false);
static bool get enableSystemProxy =>
_setting.get(SettingBoxKey.enableSystemProxy, defaultValue: false);