HEAVY: finish music service migration, tidy up services, more tests

This commit is contained in:
ari melody 2026-08-01 00:29:31 +01:00
parent 9e311df462
commit 90a671982c
Signed by: ari
GPG key ID: CF99829C92678188
47 changed files with 2698 additions and 902 deletions

View file

@ -22,7 +22,7 @@ func MusicHandler(app *app.AppState) http.Handler {
return
}
release, err := controller.GetRelease(app.DB, r.URL.Path[1:], true)
release, err := app.MusicService.GetFullReleaseByID(r.URL.Path[1:])
if err != nil {
http.NotFound(w, r)
return
@ -36,7 +36,7 @@ func MusicHandler(app *app.AppState) http.Handler {
func ServeCatalog(app *app.AppState) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
releases, err := controller.GetAllReleases(app.DB, true, 0, true)
releases, err := app.MusicService.GetAllFullReleases(true, 0)
if err != nil {
fmt.Printf("WARN: Failed to pull releases for catalog: %s\n", err)
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)