fix: 弹幕数量少于实际数量&优化弹幕请求 issues #78

This commit is contained in:
guozhigq
2023-09-17 22:30:22 +08:00
parent 7fa7152245
commit dd97636494
3 changed files with 58 additions and 41 deletions

View File

@ -17,17 +17,11 @@ class DanmakaHttp {
'oid': cid,
'segment_index': segmentIndex,
};
// 计算函数
Future<DmSegMobileReply> computeTask(Map<String, int> params) async {
var response = await Request().get(
Api.webDanmaku,
data: params,
extra: {'resType': ResponseType.bytes},
);
return DmSegMobileReply.fromBuffer(response.data);
}
return await compute(computeTask, params);
var response = await Request().get(
Api.webDanmaku,
data: params,
extra: {'resType': ResponseType.bytes},
);
return DmSegMobileReply.fromBuffer(response.data);
}
}