working logic+working watching files+added calibration feature+instructions

This commit is contained in:
Vic Sergeev 2026-05-07 21:13:00 +03:00
parent 09d181eba8
commit 97ed8217bf
25 changed files with 1743 additions and 192 deletions

View file

@ -59,7 +59,7 @@ class SessionService:
return astro_object
def handle_file(self, file_path: Path) -> bool:
"""Обрабатывает новый файл"""
"""Обрабатывает новый файл: перемещает в папку текущего объекта с переименованием"""
if not self._current_session:
return False
@ -67,11 +67,13 @@ class SessionService:
if not current_object:
return False
# Передаём имя объекта для переименования файла
success = self._file_service.move_file(
file_path,
current_object.folder,
self._current_session.camera,
self._current_session.optics
self._current_session.optics,
current_object.name # Добавляем имя объекта для переименования
)
if success:
@ -92,12 +94,14 @@ class SessionService:
if watch_folder.exists():
for file_path in watch_folder.iterdir():
if file_path.is_file() and self._file_service.is_photo(file_path):
if self._file_service.move_file(
success = self._file_service.move_file(
file_path,
current_object.folder,
self._current_session.camera,
self._current_session.optics
):
self._current_session.optics,
current_object.name # Добавляем имя объекта для переименования
)
if success:
current_object.increment_photo_count()
count += 1
if on_file_moved: