Browse Source

重构会议助手,使用服务端转写,添加文件大小

weicu
tanlongsheng 9 months ago
parent
commit
cee1342305
  1. 9
      lib/modules/meeting/controllers/meeting_home_controller.dart

9
lib/modules/meeting/controllers/meeting_home_controller.dart

@ -277,6 +277,7 @@ class MeetingHomeController extends GetxController {
// 插入数据库
final response = await Api.addRecordEchomeet({
'rtype': 'LOCAL',
'size': fileStat.size,
...data,
});
final meetingId = response['record']['id'];
@ -408,6 +409,7 @@ class MeetingHomeController extends GetxController {
final response = await Api.addRecordEchomeet({
'rtype': recordType,
'size': fileStat.size,
...data,
});
final meetingId = response['record']['id'];
@ -521,6 +523,7 @@ class MeetingHomeController extends GetxController {
await _audioPlayer.setAudioSource(AudioSource.file(filePath));
int seconds = _audioPlayer.duration?.inSeconds ?? 0;
int creationTime = DateTime.now().millisecondsSinceEpoch;
final fileStat = await File(filePath).stat();
Map<String, Object?> data = {
'title': fileName,
'type': type, // 使用传入的type参数
@ -530,7 +533,11 @@ class MeetingHomeController extends GetxController {
'tasktype': 0,
'creationtime': creationTime,
};
final response = await Api.addRecordEchomeet({'rtype': type, ...data});
final response = await Api.addRecordEchomeet({
'rtype': type,
'size': fileStat.size,
...data,
});
final meetingId = response['record']['id'];
final meetingResult = await SqfliteApi.insertMeeting({
'id': meetingId,

Loading…
Cancel
Save