forked from j62/ctbrec
Fix: recording started event was not fired in client/server mode
This commit is contained in:
parent
151c58fa9f
commit
3351a976ae
|
@ -319,6 +319,18 @@ public class RemoteRecorder implements Recorder {
|
|||
}
|
||||
}
|
||||
}
|
||||
// fire recording started event
|
||||
List<Recording> justStarted = new ArrayList<>(newRecordings);
|
||||
justStarted.removeAll(recordings);
|
||||
for (Recording recording : justStarted) {
|
||||
if (recording.getStatus() == Recording.State.RECORDING) {
|
||||
File file = new File(recording.getPath());
|
||||
RecordingStateChangedEvent evt = new RecordingStateChangedEvent(file, recording.getStatus(), recording.getModel(),
|
||||
recording.getStartDate());
|
||||
EventBusHolder.BUS.post(evt);
|
||||
}
|
||||
}
|
||||
|
||||
recordings = newRecordings;
|
||||
} else {
|
||||
LOG.error(SERVER_RETURNED_ERROR, resp.status, resp.msg);
|
||||
|
|
Loading…
Reference in New Issue