mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-14 06:08:46 +01:00
refactor: remove MissingFiles interface and update references
Remove obsolete MissingFiles interface and its references: - Delete core/missing_files.go and core/missing_files_test.go - Remove RefreshAlbums method from AlbumRepository interface and implementation - Remove RefreshAlbums tests from AlbumRepository test suite - Update wire providers to use NewMaintenance instead of NewMissingFiles - Update native API router to use Maintenance service - Update missing.go handler to use Maintenance interface All functionality is now consolidated in the core.Maintenance service. Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
319651d7d1
commit
a1ff9f3f2b
10 changed files with 70 additions and 738 deletions
|
|
@ -63,7 +63,7 @@ func (r *missingRepository) EntityName() string {
|
|||
return "missing_files"
|
||||
}
|
||||
|
||||
func deleteMissingFiles(missingFiles core.MissingFiles) http.HandlerFunc {
|
||||
func deleteMissingFiles(maintenance core.Maintenance) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
|
|
@ -72,9 +72,9 @@ func deleteMissingFiles(missingFiles core.MissingFiles) http.HandlerFunc {
|
|||
|
||||
var err error
|
||||
if len(ids) == 0 {
|
||||
err = missingFiles.DeleteAllMissingFiles(ctx)
|
||||
err = maintenance.DeleteAllMissingFiles(ctx)
|
||||
} else {
|
||||
err = missingFiles.DeleteMissingFiles(ctx, ids)
|
||||
err = maintenance.DeleteMissingFiles(ctx, ids)
|
||||
}
|
||||
|
||||
if len(ids) == 1 && errors.Is(err, model.ErrNotFound) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue