custom autosync

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-29 17:42:25 +08:00
parent 99634a66ab
commit 48c7dc0eed
4 changed files with 53 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ abstract final class SettingBoxKey {
expandBuffer = 'expandBuffer',
hardwareDecoding = 'hardwareDecoding',
videoSync = 'videoSync',
autosync = 'autosync',
p1080 = 'p1080',
enableAutoEnter = 'enableAutoEnter',
enableAutoExit = 'enableAutoExit',

View File

@@ -252,6 +252,9 @@ abstract final class Pref {
static String get videoSync =>
_setting.get(SettingBoxKey.videoSync, defaultValue: 'display-resample');
static String get autosync =>
_setting.get(SettingBoxKey.autosync, defaultValue: '30');
static CDNService get defaultCDNService {
if (_setting.get(SettingBoxKey.CDNService) case final String cdnName) {
return CDNService.values.byName(cdnName);