diff --git a/src/application/usecases/library/dataclasses.py b/src/application/usecases/library/dataclasses.py index afc8371..4f208f1 100644 --- a/src/application/usecases/library/dataclasses.py +++ b/src/application/usecases/library/dataclasses.py @@ -19,6 +19,7 @@ class SyncRunData: processed: int skipped: int errors: int + handled: int percent: int is_active: bool is_scanning: bool diff --git a/src/interfaces/library/views.py b/src/interfaces/library/views.py index 826ffae..b4f9ebb 100644 --- a/src/interfaces/library/views.py +++ b/src/interfaces/library/views.py @@ -35,6 +35,7 @@ def _sync_status(run: models.SyncRun) -> library_dataclasses.SyncRunData: processed=run.processed, skipped=run.skipped, errors=run.errors, + handled=handled, percent=percent, is_active=run.state in models.SyncRun.ACTIVE_STATES, is_scanning=run.state == models.SyncRun.STATE_SCANNING, diff --git a/src/interfaces/templates/library/partials/sync_status.html b/src/interfaces/templates/library/partials/sync_status.html index f41297b..c8aed04 100644 --- a/src/interfaces/templates/library/partials/sync_status.html +++ b/src/interfaces/templates/library/partials/sync_status.html @@ -10,7 +10,7 @@ {% if status.is_scanning %} Scanning… {% elif status.is_processing %} - Processing {{ status.processed }}/{{ status.total }} + Processing {{ status.handled }}/{{ status.total }} {% elif status.is_completed %} Imported {{ status.processed }}{% if status.skipped %}, skipped {{ status.skipped }}{% endif %}{% if status.errors %}, {{ status.errors }} error{{ status.errors|pluralize }}{% endif %} diff --git a/tests/functional/test_library_sync_status_view.py b/tests/functional/test_library_sync_status_view.py index cfd5700..4f33fee 100644 --- a/tests/functional/test_library_sync_status_view.py +++ b/tests/functional/test_library_sync_status_view.py @@ -39,6 +39,22 @@ def test_shows_progress_while_processing(self, client): assert 'hx-trigger="every 2s"' in content assert "