Project Service
app.application.services.project_serviceCaptures and restores project state through the application and project store.
See Also
ProjectStore— persists project documentsProjectDocument— represents the saved project structure
Layer: Application. Context: Implements use cases by coordinating domain and infrastructure operations at this architectural boundary.
ProjectLoadReport
dataclass
Summarize which project sessions were restored successfully.
Layer: Application. Context: Returned to callers after project restoration; missing or unopenable source videos are reported rather than aborting other sessions.
| ATTRIBUTE | DESCRIPTION |
|---|---|
restored_sessions |
Number of sessions opened and restored.
TYPE:
|
skipped_session_paths |
Video paths that could not be restored.
TYPE:
|
restored_sessions: int
instance-attribute
skipped_session_paths: list[str]
instance-attribute
__init__(restored_sessions: int, skipped_session_paths: list[str]) -> None
ProjectService
Coordinate project persistence with application session management.
Layer: Application.
Context: Captures serializable session state through the application,
delegates file encoding to ProjectStore, and restores sessions while
reporting per-video failures.
| PARAMETER | DESCRIPTION |
|---|---|
app
|
Application facade whose session manager and video operations are used to capture and restore project sessions.
TYPE:
|
current_project_path: str
property
Return the path of the currently loaded or most recently saved project.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The project file path, or an empty string when no project is active. |
directories: ProjectDirectories
property
Return the mutable project-specific import/export directory settings.
| RETURNS | DESCRIPTION |
|---|---|
ProjectDirectories
|
The current |
__init__(app: Application) -> None
clear_project() -> None
Close all managed sessions and reset the active project state.
load_project(file_path: str) -> ProjectLoadReport
Load a project and restore every session whose video is available.
| PARAMETER | DESCRIPTION |
|---|---|
file_path
|
Path to the project document to read.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ProjectLoadReport
|
Counts and paths describing restored and skipped sessions. |
save_project(file_path: str) -> ProjectDocument
Capture current sessions and persist them to a project file.
| PARAMETER | DESCRIPTION |
|---|---|
file_path
|
Destination path for the serialized project document.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ProjectDocument
|
The in-memory document that was written. |
update_directories(*, last_import_directory: str | None = None, last_export_directory: str | None = None, export_prefix: str | None = None, export_suffix: str | None = None) -> None
Update only the supplied project directory or export-name settings.
| PARAMETER | DESCRIPTION |
|---|---|
last_import_directory
|
Optional most recently used import directory.
TYPE:
|
last_export_directory
|
Optional most recently used export directory.
TYPE:
|
export_prefix
|
Optional prefix for exported filenames.
TYPE:
|
export_suffix
|
Optional suffix for exported filenames.
TYPE:
|