mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-28 21:30:18 +08:00
tweaks (#2426)
* 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:
committed by
GitHub
parent
3dee6a85e5
commit
9d94c72e95
@@ -1,3 +1,11 @@
|
||||
import 'package:PiliPlus/pages/setting/models/extra_settings.dart';
|
||||
import 'package:PiliPlus/pages/setting/models/model.dart';
|
||||
import 'package:PiliPlus/pages/setting/models/play_settings.dart';
|
||||
import 'package:PiliPlus/pages/setting/models/privacy_settings.dart';
|
||||
import 'package:PiliPlus/pages/setting/models/recommend_settings.dart';
|
||||
import 'package:PiliPlus/pages/setting/models/style_settings.dart';
|
||||
import 'package:PiliPlus/pages/setting/models/video_settings.dart';
|
||||
|
||||
enum SettingType {
|
||||
privacySetting('隐私设置'),
|
||||
recommendSetting('推荐流设置'),
|
||||
@@ -11,4 +19,14 @@ enum SettingType {
|
||||
|
||||
final String title;
|
||||
const SettingType(this.title);
|
||||
|
||||
List<SettingsModel> get settings => switch (this) {
|
||||
.privacySetting => privacySettings,
|
||||
.recommendSetting => recommendSettings,
|
||||
.videoSetting => videoSettings,
|
||||
.playSetting => playSettings,
|
||||
.styleSetting => styleSettings,
|
||||
.extraSetting => extraSettings,
|
||||
_ => throw UnimplementedError(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,9 +12,6 @@ enum VideoDecodeFormatType {
|
||||
|
||||
const VideoDecodeFormatType(this.codes);
|
||||
|
||||
static VideoDecodeFormatType fromCode(String code) =>
|
||||
values.firstWhere((i) => i.codes.contains(code));
|
||||
|
||||
static VideoDecodeFormatType fromString(String val) =>
|
||||
values.firstWhere((i) => i.codes.any(val.startsWith));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user