Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions lib/i18n/strings.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 4
/// Strings: 384 (96 per locale)
/// Strings: 404 (101 per locale)
///
/// Built on 2025-12-01 at 13:41 UTC
/// Built on 2026-05-02 at 02:19 UTC

// coverage:ignore-file
// ignore_for_file: type=lint
Expand Down Expand Up @@ -226,6 +226,10 @@ class _StringsVideoEn {
String playingCollection({required Object title}) => 'Playing: ${title}';
String get changeEpisode => 'Change Episode';
String episodeTotal({required Object total}) => 'total ${total} episodes';
String seekForward({required Object seconds}) => 'Fast forward ${seconds} s';
String seekBackward({required Object seconds}) => 'Rewind ${seconds} s';
String get doubleTapPause => 'Paused';
String get doubleTapPlay => 'Playing';
}

// Path: anime
Expand Down Expand Up @@ -331,6 +335,7 @@ class _StringsMyPlayerSettingsEn {
String get autoPlay => 'Auto Play';
String get autoJump => 'Auto Jump';
String get autoJumpSubtitle => 'Jump to the position where you stopped last time';
String get doubleTapSeekDuration => 'Double Tap fast forward/rewind seconds';
}

// Path: my.danmakuSettings
Expand Down Expand Up @@ -508,6 +513,10 @@ class _StringsVideoZhCn implements _StringsVideoEn {
@override String playingCollection({required Object title}) => '正在播放 ${title}';
@override String get changeEpisode => '切换选集';
@override String episodeTotal({required Object total}) => '全 ${total} 话';
@override String seekForward({required Object seconds}) => '快进 ${seconds} 秒';
@override String seekBackward({required Object seconds}) => '快退 ${seconds} 秒';
@override String get doubleTapPause => '暂停';
@override String get doubleTapPlay => '播放';
}

// Path: anime
Expand Down Expand Up @@ -612,6 +621,7 @@ class _StringsMyPlayerSettingsZhCn implements _StringsMyPlayerSettingsEn {
@override String get hardwareAcceleration => '硬件解码';
@override String get autoPlay => '自动播放';
@override String get autoJump => '自动跳转';
@override String get doubleTapSeekDuration => '双击跳转时长';
@override String get autoJumpSubtitle => '跳转到上次播放位置';
}

Expand Down Expand Up @@ -790,6 +800,10 @@ class _StringsVideoZhHk implements _StringsVideoEn {
@override String playingCollection({required Object title}) => '正在播放 ${title}';
@override String get changeEpisode => '切換選集';
@override String episodeTotal({required Object total}) => '全 ${total} 話';
@override String seekForward({required Object seconds}) => '快進 ${seconds} 秒';
@override String seekBackward({required Object seconds}) => '快退 ${seconds} 秒';
@override String get doubleTapPause => '暫停';
@override String get doubleTapPlay => '播放';
}

// Path: anime
Expand Down Expand Up @@ -894,6 +908,7 @@ class _StringsMyPlayerSettingsZhHk implements _StringsMyPlayerSettingsEn {
@override String get hardwareAcceleration => '硬件解碼';
@override String get autoPlay => '自動播放';
@override String get autoJump => '自動跳轉';
@override String get doubleTapSeekDuration => '雙擊跳轉時長';
@override String get autoJumpSubtitle => '跳轉到上次播放位置';
}

Expand Down Expand Up @@ -1072,6 +1087,10 @@ class _StringsVideoZhTw implements _StringsVideoEn {
@override String playingCollection({required Object title}) => '正在播放 ${title}';
@override String get changeEpisode => '切換選集';
@override String episodeTotal({required Object total}) => '全 ${total} 話';
@override String seekForward({required Object seconds}) => '快進 ${seconds} 秒';
@override String seekBackward({required Object seconds}) => '快退 ${seconds} 秒';
@override String get doubleTapPause => '暫停';
@override String get doubleTapPlay => '播放';
}

// Path: anime
Expand Down Expand Up @@ -1176,6 +1195,7 @@ class _StringsMyPlayerSettingsZhTw implements _StringsMyPlayerSettingsEn {
@override String get hardwareAcceleration => '硬件解碼';
@override String get autoPlay => '自動播放';
@override String get autoJump => '自動跳轉';
@override String get doubleTapSeekDuration => '雙擊跳轉時長';
@override String get autoJumpSubtitle => '跳轉到上次播放位置';
}

Expand Down Expand Up @@ -1291,6 +1311,10 @@ extension on Translations {
case 'video.playingCollection': return ({required Object title}) => 'Playing: ${title}';
case 'video.changeEpisode': return 'Change Episode';
case 'video.episodeTotal': return ({required Object total}) => 'total ${total} episodes';
case 'video.seekForward': return ({required Object seconds}) => 'Fast forward ${seconds} s';
case 'video.seekBackward': return ({required Object seconds}) => 'Rewind ${seconds} s';
case 'video.doubleTapPause': return 'Paused';
case 'video.doubleTapPlay': return 'Playing';
case 'anime.anime': return 'Anime';
case 'anime.serializing': return 'Serializing';
case 'anime.OVA': return 'OVA';
Expand All @@ -1317,6 +1341,7 @@ extension on Translations {
case 'my.playerSettings.autoPlay': return 'Auto Play';
case 'my.playerSettings.autoJump': return 'Auto Jump';
case 'my.playerSettings.autoJumpSubtitle': return 'Jump to the position where you stopped last time';
case 'my.playerSettings.doubleTapSeekDuration': return 'Double Tap fast forward/rewind seconds';
case 'my.danmakuSettings.title': return 'Danmaku Settings';
case 'my.danmakuSettings.defaultEnable': return 'Default Enable';
case 'my.danmakuSettings.defaultEnableSubtitle': return 'Whether to enable danmaku by default';
Expand Down Expand Up @@ -1395,6 +1420,10 @@ extension on _StringsZhCn {
case 'video.playingCollection': return ({required Object title}) => '正在播放 ${title}';
case 'video.changeEpisode': return '切换选集';
case 'video.episodeTotal': return ({required Object total}) => '全 ${total} 话';
case 'video.seekForward': return ({required Object seconds}) => '快进 ${seconds} 秒';
case 'video.seekBackward': return ({required Object seconds}) => '快退 ${seconds} 秒';
case 'video.doubleTapPause': return '暂停';
case 'video.doubleTapPlay': return '播放';
case 'anime.anime': return '新番';
case 'anime.serializing': return '连载中';
case 'anime.OVA': return 'OVA';
Expand All @@ -1420,6 +1449,7 @@ extension on _StringsZhCn {
case 'my.playerSettings.hardwareAcceleration': return '硬件解码';
case 'my.playerSettings.autoPlay': return '自动播放';
case 'my.playerSettings.autoJump': return '自动跳转';
case 'my.playerSettings.doubleTapSeekDuration': return '双击跳转时长';
case 'my.playerSettings.autoJumpSubtitle': return '跳转到上次播放位置';
case 'my.danmakuSettings.title': return '弹幕设置';
case 'my.danmakuSettings.defaultEnable': return '默认开启';
Expand Down Expand Up @@ -1499,6 +1529,10 @@ extension on _StringsZhHk {
case 'video.playingCollection': return ({required Object title}) => '正在播放 ${title}';
case 'video.changeEpisode': return '切換選集';
case 'video.episodeTotal': return ({required Object total}) => '全 ${total} 話';
case 'video.seekForward': return ({required Object seconds}) => '快進 ${seconds} 秒';
case 'video.seekBackward': return ({required Object seconds}) => '快退 ${seconds} 秒';
case 'video.doubleTapPause': return '暫停';
case 'video.doubleTapPlay': return '播放';
case 'anime.anime': return '新番';
case 'anime.serializing': return '連載中';
case 'anime.OVA': return 'OVA';
Expand All @@ -1524,6 +1558,7 @@ extension on _StringsZhHk {
case 'my.playerSettings.hardwareAcceleration': return '硬件解碼';
case 'my.playerSettings.autoPlay': return '自動播放';
case 'my.playerSettings.autoJump': return '自動跳轉';
case 'my.playerSettings.doubleTapSeekDuration': return '雙擊跳轉時長';
case 'my.playerSettings.autoJumpSubtitle': return '跳轉到上次播放位置';
case 'my.danmakuSettings.title': return '彈幕設置';
case 'my.danmakuSettings.defaultEnable': return '默認開啟';
Expand Down Expand Up @@ -1603,6 +1638,10 @@ extension on _StringsZhTw {
case 'video.playingCollection': return ({required Object title}) => '正在播放 ${title}';
case 'video.changeEpisode': return '切換選集';
case 'video.episodeTotal': return ({required Object total}) => '全 ${total} 話';
case 'video.seekForward': return ({required Object seconds}) => '快進 ${seconds} 秒';
case 'video.seekBackward': return ({required Object seconds}) => '快退 ${seconds} 秒';
case 'video.doubleTapPause': return '暫停';
case 'video.doubleTapPlay': return '播放';
case 'anime.anime': return '新番';
case 'anime.serializing': return '連載中';
case 'anime.OVA': return 'OVA';
Expand All @@ -1628,6 +1667,7 @@ extension on _StringsZhTw {
case 'my.playerSettings.hardwareAcceleration': return '硬件解碼';
case 'my.playerSettings.autoPlay': return '自動播放';
case 'my.playerSettings.autoJump': return '自動跳轉';
case 'my.playerSettings.doubleTapSeekDuration': return '雙擊跳轉時長';
case 'my.playerSettings.autoJumpSubtitle': return '跳轉到上次播放位置';
case 'my.danmakuSettings.title': return '彈幕設置';
case 'my.danmakuSettings.defaultEnable': return '默認開啟';
Expand Down
11 changes: 8 additions & 3 deletions lib/i18n/strings.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
"collection": "Collection ",
"playingCollection": "Playing: $title",
"changeEpisode": "Change Episode",
"episodeTotal": "total $total episodes"
"episodeTotal": "total $total episodes",
"seekForward": "Fast forward $seconds s",
"seekBackward": "Rewind $seconds s",
"doubleTapPause": "Paused",
"doubleTapPlay": "Playing"
},
"anime": {
"anime": "Anime",
Expand Down Expand Up @@ -77,7 +81,8 @@
"hardwareAcceleration": "Hardware Acceleration",
"autoPlay": "Auto Play",
"autoJump": "Auto Jump",
"autoJumpSubtitle": "Jump to the position where you stopped last time"
"autoJumpSubtitle": "Jump to the position where you stopped last time",
"doubleTapSeekDuration": "Double Tap fast forward/rewind seconds"
},
"danmakuSettings": {
"title": "Danmaku Settings",
Expand Down Expand Up @@ -127,4 +132,4 @@
"currentVersion": "Current Version"
}
}
}
}
9 changes: 7 additions & 2 deletions lib/i18n/strings_zh-CN.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
"collection": "合集 ",
"playingCollection": "正在播放 $title",
"changeEpisode": "切换选集",
"episodeTotal": "全 $total 话"
"episodeTotal": "全 $total 话",
"seekForward": "快进 $seconds 秒",
"seekBackward": "快退 $seconds 秒",
"doubleTapPause": "暂停",
"doubleTapPlay": "播放"
},
"anime": {
"anime": "新番",
Expand Down Expand Up @@ -77,6 +81,7 @@
"hardwareAcceleration": "硬件解码",
"autoPlay": "自动播放",
"autoJump": "自动跳转",
"doubleTapSeekDuration": "双击跳转时长",
"autoJumpSubtitle": "跳转到上次播放位置"
},
"danmakuSettings": {
Expand Down Expand Up @@ -127,4 +132,4 @@
"currentVersion": "当前版本"
}
}
}
}
9 changes: 7 additions & 2 deletions lib/i18n/strings_zh-HK.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
"collection": "合集 ",
"playingCollection": "正在播放 $title",
"changeEpisode": "切換選集",
"episodeTotal": "全 $total 話"
"episodeTotal": "全 $total 話",
"seekForward": "快進 $seconds 秒",
"seekBackward": "快退 $seconds 秒",
"doubleTapPause": "暫停",
"doubleTapPlay": "播放"
},
"anime": {
"anime": "新番",
Expand Down Expand Up @@ -77,6 +81,7 @@
"hardwareAcceleration": "硬件解碼",
"autoPlay": "自動播放",
"autoJump": "自動跳轉",
"doubleTapSeekDuration": "雙擊跳轉時長",
"autoJumpSubtitle": "跳轉到上次播放位置"
},
"danmakuSettings": {
Expand Down Expand Up @@ -127,4 +132,4 @@
"currentVersion": "當前版本"
}
}
}
}
9 changes: 7 additions & 2 deletions lib/i18n/strings_zh-TW.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
"collection": "合集 ",
"playingCollection": "正在播放 $title",
"changeEpisode": "切換選集",
"episodeTotal": "全 $total 話"
"episodeTotal": "全 $total 話",
"seekForward": "快進 $seconds 秒",
"seekBackward": "快退 $seconds 秒",
"doubleTapPause": "暫停",
"doubleTapPlay": "播放"
},
"anime": {
"anime": "新番",
Expand Down Expand Up @@ -77,6 +81,7 @@
"hardwareAcceleration": "硬件解碼",
"autoPlay": "自動播放",
"autoJump": "自動跳轉",
"doubleTapSeekDuration": "雙擊跳轉時長",
"autoJumpSubtitle": "跳轉到上次播放位置"
},
"danmakuSettings": {
Expand Down Expand Up @@ -127,4 +132,4 @@
"currentVersion": "當前版本"
}
}
}
}
38 changes: 38 additions & 0 deletions lib/pages/settings/player_settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@ class _PlayerSettingsPageState extends State<PlayerSettingsPage> {
dynamic navigationBarState;
Box setting = GStorage.setting;
late Translations i18n;
late int _seekDuration;
final PopularController popularController = Modular.get<PopularController>();

@override
void initState() {
super.initState();
_seekDuration =
setting.get(SettingBoxKey.doubleTapSeekDuration, defaultValue: 10);
}

void _updateSeekDuration(int value) async {
await setting.put(SettingBoxKey.doubleTapSeekDuration, value);
setState(() {
_seekDuration = value;
});
}

@override
Expand Down Expand Up @@ -55,6 +65,34 @@ class _PlayerSettingsPageState extends State<PlayerSettingsPage> {
defaultVal: false,
),
),
ListTile(
dense: false,
title: Text(i18n.my.playerSettings.doubleTapSeekDuration),
subtitle: Row(
children: [
Expanded(
child: Slider(
value: _seekDuration.toDouble(),
min: 5,
max: 20,
divisions: 3,
label: '$_seekDuration s',
onChanged: (double value) {
_updateSeekDuration(value.toInt());
},
),
),
Text(
'$_seekDuration s',
style: Theme.of(context)
.textTheme
.labelMedium!
.copyWith(color: Theme.of(context).colorScheme.outline),
),
const SizedBox(width: 8),
],
),
),
],
),
);
Expand Down
Loading
Loading