refactor library service to use REST repository pattern and remove CRUD operations

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan 2025-06-06 18:47:21 -04:00
commit d2a2c43ef5
11 changed files with 476 additions and 406 deletions

View file

@ -5,23 +5,22 @@ import (
)
type Library struct {
ID int
Name string
Path string
RemotePath string
LastScanAt time.Time
LastScanStartedAt time.Time
FullScanInProgress bool
UpdatedAt time.Time
CreatedAt time.Time
TotalSongs int
TotalAlbums int
TotalArtists int
TotalFolders int
TotalFiles int
TotalMissingFiles int
TotalSize int64
ID int `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
RemotePath string `json:"remotePath"`
LastScanAt time.Time `json:"lastScanAt"`
LastScanStartedAt time.Time `json:"lastScanStartedAt"`
FullScanInProgress bool `json:"fullScanInProgress"`
UpdatedAt time.Time `json:"updatedAt"`
CreatedAt time.Time `json:"createdAt"`
TotalSongs int `json:"totalSongs"`
TotalAlbums int `json:"totalAlbums"`
TotalArtists int `json:"totalArtists"`
TotalFolders int `json:"totalFolders"`
TotalFiles int `json:"totalFiles"`
TotalMissingFiles int `json:"totalMissingFiles"`
TotalSize int64 `json:"totalSize"`
}
type Libraries []Library