opt ua

opt subtitle

opt playertype

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-26 18:41:11 +08:00
parent a05ecd020b
commit 3a78ead3a6
28 changed files with 218 additions and 221 deletions

View File

@@ -95,22 +95,22 @@ List<SettingsModel> get playSettings => [
title: '自动启用字幕',
leading: const Icon(Icons.closed_caption_outlined),
getSubtitle: () =>
'当前选择偏好:${SubtitlePrefTypeExt.fromCode(Pref.subtitlePreference)!.description}',
'当前选择偏好:${SubtitlePrefType.values[Pref.subtitlePreferenceV2].desc}',
onTap: (setState) async {
String? result = await showDialog(
int? result = await showDialog(
context: Get.context!,
builder: (context) {
return SelectDialog<String>(
return SelectDialog<int>(
title: '字幕选择偏好',
value: Pref.subtitlePreference,
value: Pref.subtitlePreferenceV2,
values: SubtitlePrefType.values
.map((e) => (e.code, e.description))
.map((e) => (e.index, e.desc))
.toList(),
);
},
);
if (result != null) {
await GStorage.setting.put(SettingBoxKey.subtitlePreference, result);
await GStorage.setting.put(SettingBoxKey.subtitlePreferenceV2, result);
setState();
}
},