startRecordLineFileDown method
Implementation
Future<bool> startRecordLineFileDown(List<RecordTimeLineDown> files,
{int timeout = 5}) async {
Map data = Map();
List download = files.map((e) => e.getData()).toList();
data["download"] = download;
var str = "record_fastplay.cgi?ctrl=1&playlist=${jsonEncode(data)}&";
bool ret = await writeCgi(str, timeout: timeout);
if (ret) {
CommandResult result = await waitCommandResult((int cmd, Uint8List data) {
return cmd == 24837;
}, timeout);
if (result.isSuccess) {
Map data = result.getMap();
return data["result"] == "0";
}
}
return false;
}