Hotfix for sonarr search
Some checks failed
GoReleaser / goreleaser (push) Has been cancelled
Release Docker Build / docker (push) Has been cancelled

This commit is contained in:
Mukhtar Akere
2025-03-13 09:07:35 +01:00
parent c0589d4ad2
commit b4e4db27fb
2 changed files with 7 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ type episode struct {
type sonarrSearch struct {
Name string `json:"name"`
SeasonNumber int `json:"seasonNumber"`
SeriesId int `json:"episodeIds"`
SeriesId int `json:"seriesId"`
}
type radarrSearch struct {

View File

@@ -461,11 +461,12 @@ func (ui *Handler) handleProcessRepairJob(w http.ResponseWriter, r *http.Request
http.Error(w, "No job ID provided", http.StatusBadRequest)
return
}
svc := service.GetService()
if err := svc.Repair.ProcessJob(id); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
go func() {
svc := service.GetService()
if err := svc.Repair.ProcessJob(id); err != nil {
ui.logger.Error().Err(err).Msg("Failed to process repair job")
}
}()
w.WriteHeader(http.StatusOK)
}