navidrome/server
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
..
backgrounds feat(ui): use webp for login backgrounds 2025-03-06 23:32:52 -05:00
events feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
nativeapi refactor: extract missing files deletion into reusable service layer 2025-11-08 15:50:43 -05:00
public fix(share): force share image to be square (to fix aspect ratio) (#4122) 2025-05-26 17:39:05 -04:00
subsonic feat(subsonic): populate Folder field with user's accessible library IDs 2025-07-29 18:00:33 -04:00
auth.go feat(plugins): allow Plugins to call the Subsonic API (#4260) 2025-06-25 14:18:32 -04:00
auth_test.go fix(server): first user created should be admin, when using reverse proxy (#3920) 2025-04-05 08:24:14 -03:00
initial_setup.go chore(server): add logs to begin/end transaction 2025-02-24 19:13:42 -05:00
initial_setup_test.go Upgrade Ginkgo to V2 2022-07-26 16:53:17 -04:00
middlewares.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
middlewares_test.go feat(ui): show user's lastAccess (#3342) 2024-09-30 20:46:10 -04:00
serve_index.go feat(ui): implement new event stream connection logic 2025-06-29 10:18:05 -04:00
serve_index_test.go feat(ui): implement new event stream connection logic 2025-06-29 10:18:05 -04:00
server.go fix(server): don't override /song routes 2025-06-01 14:41:50 -04:00
server_suite_test.go Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
server_test.go Make server unix socket file permission configurable via flag UnixSocketPerm (#2763) 2024-01-20 14:50:30 -05:00