mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-22 14:38:06 +02:00
fix(recordings): DELETE now kills FFmpeg process before removing from DB to properly stop active recordings
This commit is contained in:
1 parent
4c2e3ce600
commit
bbf462ae05
1 file changed
+5
-1
@@ -84,7 +84,8 @@ class RecordingsApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// DELETE /api/recordings/<id> — Annule ou supprime un enregistrement
|
/// DELETE /api/recordings/<id> — Annule ou supprime un enregistrement
|
||||||
Response handleDelete(Request request, String id) {
|
/// Si un enregistrement FFmpeg est actif, il est arrêté avant la suppression
|
||||||
|
Future<Response> handleDelete(Request request, String id) async {
|
||||||
final recording = _db.getRecordingById(id);
|
final recording = _db.getRecordingById(id);
|
||||||
|
|
||||||
if (recording == null) {
|
if (recording == null) {
|
||||||
@@ -94,6 +95,9 @@ class RecordingsApi {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tuer FFmpeg si cet enregistrement est en cours AVANT de supprimer de la DB
|
||||||
|
await _scheduler.stopRecording(id);
|
||||||
|
|
||||||
_db.deleteRecording(id);
|
_db.deleteRecording(id);
|
||||||
|
|
||||||
return Response.ok(
|
return Response.ok(
|
||||||
|
|||||||
Reference in new issue
Block a user