基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。
deps: bump media kit && enable mediacodec for android
Predidit14f8cb0fdf5d
diff --git a/lib/services/storage/settings_keys.dart b/lib/services/storage/settings_keys.dartindex 1c6d7225..512ab6f0 100644--- a/lib/services/storage/settings_keys.dart+++ b/lib/services/storage/settings_keys.dart@@ -14,9 +14,13 @@ enum SettingGroup {}class SettingContext {- const SettingContext({this.compactLayout = false});+ const SettingContext({+ this.compactLayout = false,+ this.isAndroid = false,+ });final bool compactLayout;+ final bool isAndroid;}class SettingKey<T> {@@ -49,6 +53,7 @@ class SettingsKeys {_SettingBoxKey.hardwareDecoder,'auto-safe',group: SettingGroup.player,+ defaultResolver: _resolveHardwareDecoderDefault,);static const searchEnhanceEnable = SettingKey<bool>(_SettingBoxKey.searchEnhanceEnable,@@ -601,6 +606,10 @@ class SettingsKeys {SettingsKeys._();}+String _resolveHardwareDecoderDefault(SettingContext context) {+ return context.isAndroid ? 'mediacodec' : 'auto-safe';+}+// Historical Hive key names used by settings created before the typed registry.// Keep these strings stable so existing users keep their saved settings.// New settings do not need to be added here unless they intentionally reuse andiff --git a/lib/services/storage/storage.dart b/lib/services/storage/storage.dartindex 7adf3734..6927289f 100644--- a/lib/services/storage/storage.dart+++ b/lib/services/storage/storage.dart@@ -327,9 +327,13 @@ class GStorage {static T getSetting<T>(SettingKey<T> key, {- SettingContext context = const SettingContext(),+ SettingContext? context,}) {- final defaultValue = key.resolveDefault(context);+ final effectiveContext = context ??+ SettingContext(+ isAndroid: Platform.isAndroid,+ );+ final defaultValue = key.resolveDefault(effectiveContext);final storedValue = _setting.get(key.name);if (storedValue is T) {return storedValue;diff --git a/pubspec.lock b/pubspec.lockindex d31b89df..df73ee44 100644--- a/pubspec.lock+++ b/pubspec.lock@@ -924,8 +924,8 @@ packages:dependency: "direct main"description:path: media_kit- ref: "11d02cb804b8faf944137834a1b0ac80880a4079"- resolved-ref: "11d02cb804b8faf944137834a1b0ac80880a4079"+ ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"+ resolved-ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"url: "https://github.com/Predidit/media-kit.git"source: gitversion: "1.1.11"@@ -933,8 +933,8 @@ packages:dependency: "direct overridden"description:path: "libs/android/media_kit_libs_android_video"- ref: "11d02cb804b8faf944137834a1b0ac80880a4079"- resolved-ref: "11d02cb804b8faf944137834a1b0ac80880a4079"+ ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"+ resolved-ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"url: "https://github.com/Predidit/media-kit.git"source: gitversion: "1.3.6"@@ -942,8 +942,8 @@ packages:dependency: "direct overridden"description:path: "libs/ios/media_kit_libs_ios_video"- ref: "11d02cb804b8faf944137834a1b0ac80880a4079"- resolved-ref: "11d02cb804b8faf944137834a1b0ac80880a4079"+ ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"+ resolved-ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"url: "https://github.com/Predidit/media-kit.git"source: gitversion: "1.1.4"@@ -951,8 +951,8 @@ packages:dependency: "direct overridden"description:path: "libs/linux/media_kit_libs_linux"- ref: "11d02cb804b8faf944137834a1b0ac80880a4079"- resolved-ref: "11d02cb804b8faf944137834a1b0ac80880a4079"+ ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"+ resolved-ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"url: "https://github.com/Predidit/media-kit.git"source: gitversion: "1.1.3"@@ -960,8 +960,8 @@ packages:dependency: "direct overridden"description:path: "libs/macos/media_kit_libs_macos_video"- ref: "11d02cb804b8faf944137834a1b0ac80880a4079"- resolved-ref: "11d02cb804b8faf944137834a1b0ac80880a4079"+ ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"+ resolved-ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"url: "https://github.com/Predidit/media-kit.git"source: gitversion: "1.1.4"@@ -969,8 +969,8 @@ packages:dependency: "direct overridden"description:path: "libs/ohos/media_kit_libs_ohos"- ref: "11d02cb804b8faf944137834a1b0ac80880a4079"- resolved-ref: "11d02cb804b8faf944137834a1b0ac80880a4079"+ ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"+ resolved-ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"url: "https://github.com/Predidit/media-kit.git"source: gitversion: "1.0.0"@@ -978,8 +978,8 @@ packages:dependency: "direct main"description:path: "libs/universal/media_kit_libs_video"- ref: "11d02cb804b8faf944137834a1b0ac80880a4079"- resolved-ref: "11d02cb804b8faf944137834a1b0ac80880a4079"+ ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"+ resolved-ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"url: "https://github.com/Predidit/media-kit.git"source: gitversion: "1.0.5"@@ -987,8 +987,8 @@ packages:dependency: "direct overridden"description:path: "libs/windows/media_kit_libs_windows_video"- ref: "11d02cb804b8faf944137834a1b0ac80880a4079"- resolved-ref: "11d02cb804b8faf944137834a1b0ac80880a4079"+ ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"+ resolved-ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"url: "https://github.com/Predidit/media-kit.git"source: gitversion: "1.0.10"@@ -996,8 +996,8 @@ packages:dependency: "direct main"description:path: media_kit_video- ref: "11d02cb804b8faf944137834a1b0ac80880a4079"- resolved-ref: "11d02cb804b8faf944137834a1b0ac80880a4079"+ ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"+ resolved-ref: "652cfc765a43792be8bec429ea72296d5d96fb7d"url: "https://github.com/Predidit/media-kit.git"source: gitversion: "1.2.5"diff --git a/pubspec.yaml b/pubspec.yamlindex 57d8f3b1..bfc6fb11 100644--- a/pubspec.yaml+++ b/pubspec.yaml@@ -118,49 +118,49 @@ dependencies:media_kit:git:url: https://github.com/Predidit/media-kit.git- ref: 11d02cb804b8faf944137834a1b0ac80880a4079+ ref: 652cfc765a43792be8bec429ea72296d5d96fb7dpath: ./media_kitmedia_kit_video:git:url: https://github.com/Predidit/media-kit.git- ref: 11d02cb804b8faf944137834a1b0ac80880a4079+ ref: 652cfc765a43792be8bec429ea72296d5d96fb7dpath: ./media_kit_videomedia_kit_libs_video:git:url: https://github.com/Predidit/media-kit.git- ref: 11d02cb804b8faf944137834a1b0ac80880a4079+ ref: 652cfc765a43792be8bec429ea72296d5d96fb7dpath: ./libs/universal/media_kit_libs_videodependency_overrides:media_kit_libs_linux:git:url: https://github.com/Predidit/media-kit.git- ref: 11d02cb804b8faf944137834a1b0ac80880a4079+ ref: 652cfc765a43792be8bec429ea72296d5d96fb7dpath: ./libs/linux/media_kit_libs_linuxmedia_kit_libs_ios_video:git:url: https://github.com/Predidit/media-kit.git- ref: 11d02cb804b8faf944137834a1b0ac80880a4079+ ref: 652cfc765a43792be8bec429ea72296d5d96fb7dpath: ./libs/ios/media_kit_libs_ios_videomedia_kit_libs_android_video:git:url: https://github.com/Predidit/media-kit.git- ref: 11d02cb804b8faf944137834a1b0ac80880a4079+ ref: 652cfc765a43792be8bec429ea72296d5d96fb7dpath: ./libs/android/media_kit_libs_android_videomedia_kit_libs_windows_video:git:url: https://github.com/Predidit/media-kit.git- ref: 11d02cb804b8faf944137834a1b0ac80880a4079+ ref: 652cfc765a43792be8bec429ea72296d5d96fb7dpath: ./libs/windows/media_kit_libs_windows_videomedia_kit_libs_macos_video:git:url: https://github.com/Predidit/media-kit.git- ref: 11d02cb804b8faf944137834a1b0ac80880a4079+ ref: 652cfc765a43792be8bec429ea72296d5d96fb7dpath: ./libs/macos/media_kit_libs_macos_videomedia_kit_libs_ohos:git:url: https://github.com/Predidit/media-kit.git- ref: 11d02cb804b8faf944137834a1b0ac80880a4079+ ref: 652cfc765a43792be8bec429ea72296d5d96fb7dpath: ./libs/ohos/media_kit_libs_ohosdev_dependencies: