(backend) add property to check if recording file is saved

Introduce new property that verifies if a recording file has a saved
status. While the implementation is straightforward, it improves code
readability and provides a clear, semantic way to check file status.
This commit is contained in:
lebaudantoine
2025-04-11 14:28:45 +02:00
committed by aleb_the_flash
parent 3671f2a0dd
commit 20aceb1932
2 changed files with 40 additions and 0 deletions
+5
View File
@@ -578,6 +578,11 @@ class Recording(BaseModel):
RecordingStatusChoices.STOPPED,
}
@property
def is_saved(self) -> bool:
"""Check if the recording is in a saved state."""
return self.status == RecordingStatusChoices.SAVED
@property
def extension(self):
"""Get recording extension based on its mode."""