feat: spool media inputs to disk and report producer progress (#1520)

This commit is contained in:
Levi authored and GitHub committed 2026-09-18 22:17:22 +08:00
1 parent 38750d8505
commit b1dd46cc7c
37 files changed
+1831 -375

No files matched your search

@@ -23,6 +23,7 @@ class StartConfig {
bool mcpEnable = false;
late String storage;
late String storageDir;
String? tempDir;
late int refreshInterval;
late String apiToken;
WebViewRpcConfig? webViewRpcConfig;
@@ -23,9 +23,10 @@ StartConfig _$StartConfigFromJson(Map<String, dynamic> json) => StartConfig()
..network = json['network'] as String
..address = json['address'] as String
..apiEnable = json['apiEnable'] as bool
..mcpEnable = json['mcpEnable'] as bool? ?? false
..mcpEnable = json['mcpEnable'] as bool
..storage = json['storage'] as String
..storageDir = json['storageDir'] as String
..tempDir = json['tempDir'] as String?
..refreshInterval = (json['refreshInterval'] as num).toInt()
..apiToken = json['apiToken'] as String
..webViewRpcConfig = json['webViewRpcConfig'] == null
@@ -42,6 +43,7 @@ Map<String, dynamic> _$StartConfigToJson(StartConfig instance) =>
'mcpEnable': instance.mcpEnable,
'storage': instance.storage,
'storageDir': instance.storageDir,
'tempDir': ?instance.tempDir,
'refreshInterval': instance.refreshInterval,
'apiToken': instance.apiToken,
'webViewRpcConfig': ?instance.webViewRpcConfig,
@@ -1,5 +1,7 @@
import 'dart:async';
import 'package:path_provider/path_provider.dart';
import '../../util/util.dart';
import '../common/libgopeed_channel.dart';
import '../common/libgopeed_ffi.dart';
@@ -26,6 +28,9 @@ class LibgopeedBootNative implements LibgopeedBoot {
Future<int> start(StartConfig cfg) async {
cfg.storage = 'bolt';
cfg.storageDir = Util.getStorageDir();
if (Util.isMobile()) {
cfg.tempDir = (await getTemporaryDirectory()).path;
}
cfg.refreshInterval = 0;
return _libgopeed.start(cfg);
}