navidrome/server/nativeapi
Deluan 593b5db8e9 refactor: extract missing files deletion into reusable service layer
Extracted inline deletion logic from server/nativeapi/missing.go into a new core.MissingFiles service interface and implementation. This provides better separation of concerns and testability.

The MissingFiles service handles:
- Deletion of specific or all missing files via transaction
- Garbage collection after deletion
- Extraction of affected album IDs from missing files
- Background refresh of artist and album statistics

The deleteMissingFiles HTTP handler now simply delegates to the service, removing 70+ lines of inline logic. All deletion, transaction, and stat refresh logic is now centralized in core/missing_files.go.

Updated dependency injection to provide MissingFiles service to the native API router. Renamed receiver variable from 'n' to 'api' throughout native_api.go for consistency.
2025-11-08 15:50:43 -05:00
..
config.go feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
config_test.go refactor: extract missing files deletion into reusable service layer 2025-11-08 15:50:43 -05:00
inspect.go feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
library.go refactor: extract missing files deletion into reusable service layer 2025-11-08 15:50:43 -05:00
library_test.go refactor: extract missing files deletion into reusable service layer 2025-11-08 15:50:43 -05:00
missing.go refactor: extract missing files deletion into reusable service layer 2025-11-08 15:50:43 -05:00
native_api.go refactor: extract missing files deletion into reusable service layer 2025-11-08 15:50:43 -05:00
native_api_song_test.go refactor: extract missing files deletion into reusable service layer 2025-11-08 15:50:43 -05:00
native_api_suite_test.go Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
playlists.go feat(ui): add song Love and Rating functionality to playlist view (#4134) 2025-06-04 20:38:28 -04:00
queue.go feat(server): add update and clear play queue endpoints to native API (#4215) 2025-06-11 12:02:31 -04:00
queue_test.go feat(server): add update and clear play queue endpoints to native API (#4215) 2025-06-11 12:02:31 -04:00
translations.go refactor: load translations with sync.OnceValues 2024-11-18 14:07:31 +02:00
translations_test.go Upgrade Ginkgo to V2 2022-07-26 16:53:17 -04:00