Commit Graph

6 Commits

Author SHA1 Message Date
02edb186bb feat: Implement photo capture functionality
Implement the logic for capturing and saving photos from the live preview stream.

- Add `save_photo` method to `MediaRepository` to handle file saving and database updates.
- `MainController` now tracks the selected color and the latest camera frame.
- The "Take Photo" button is enabled only when a color is selected.
- Pressing the button saves the current preview frame to the correct media folder and refreshes the thumbnail list.
- Fixes indentation issues in `main_controller.py` caused by previous faulty replacements.
2025-10-14 10:04:01 +02:00
c8d9029df7 refactor: Implement Singleton pattern for DatabaseManager
Refactor the database handling to use a Singleton pattern for `DatabaseManager`.

- A single, module-level instance `db_manager` is created in `core/database.py` to ensure one database connection is used throughout the application.
- `MediaRepository` and `MainController` are updated to use this shared instance instead of creating their own.
- This simplifies dependency injection and prevents potential issues with multiple database connections.
- Also, update `review.md` to reflect the progress.
2025-10-14 08:55:45 +02:00
cfea46c653 refactor media and database handling to replace 'filename' with 'media_path' for consistency 2025-09-07 20:00:05 +02:00
9d60843ec5 refactor database and media handling to use icon paths instead of flags 2025-09-07 13:21:29 +02:00
63e6386239 add update color and check icon on startup 2025-09-07 07:03:47 +02:00
1d627080ce add database manager and media manager 2025-09-07 06:07:16 +02:00