mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: super resolution from kazumi/main
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -10,6 +10,7 @@ import 'package:PiliPlus/models/common/dynamics_type.dart';
|
||||
import 'package:PiliPlus/models/common/nav_bar_config.dart';
|
||||
import 'package:PiliPlus/models/common/rcmd_type.dart';
|
||||
import 'package:PiliPlus/models/common/reply_sort_type.dart';
|
||||
import 'package:PiliPlus/models/common/super_resolution_type.dart';
|
||||
import 'package:PiliPlus/models/common/theme_type.dart';
|
||||
import 'package:PiliPlus/models/common/up_panel_position.dart';
|
||||
import 'package:PiliPlus/models/video/play/CDN.dart';
|
||||
@@ -1860,6 +1861,32 @@ List<SettingsModel> get extraSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.normal,
|
||||
title: '超分辨率',
|
||||
leading: const Icon(Icons.stay_current_landscape_outlined),
|
||||
getSubtitle: () =>
|
||||
'当前:「${SuperResolutionType.values[GStorage.superResolutionType].title}」\n超分辨率只对「番剧」启用, 需要启用硬件解码, 若启用硬件解码后仍然不生效, 尝试切换硬件解码器为 auto-copy',
|
||||
onTap: (setState) async {
|
||||
SuperResolutionType? result = await showDialog(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<SuperResolutionType>(
|
||||
title: '超分辨率',
|
||||
value:
|
||||
SuperResolutionType.values[GStorage.superResolutionType],
|
||||
values: SuperResolutionType.values.map((e) {
|
||||
return {'title': e.title, 'value': e};
|
||||
}).toList());
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
await GStorage.setting
|
||||
.put(SettingBoxKey.superResolutionType, result.index);
|
||||
setState();
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
enableFeedback: true,
|
||||
|
||||
Reference in New Issue
Block a user