fix(search): link results to book detail page and add cover thumbnails
Release / build-and-push (push) Successful in 2m24s
Release / build-and-push (push) Successful in 2m24s
Search results navigated to /bookshelf with no filters instead of the selected book's page. Results now link to /media/:id and display cover thumbnails, with cover URLs resolved server-side via ResolveMediaURL. Removes the dead selectedBook localStorage plumbing.
This commit is contained in:
@@ -1791,6 +1791,10 @@ func (mh *MediaHandler) SearchMediaItems(c *echo.Context) error {
|
||||
"results": []interface{}{},
|
||||
})
|
||||
}
|
||||
for i := range results {
|
||||
resolved := utils.ResolveMediaURL(results[i].LibraryID, results[i].CoverImagePath)
|
||||
results[i].CoverImagePath = pgtype.Text{String: resolved, Valid: resolved != ""}
|
||||
}
|
||||
return c.JSON(http.StatusOK, results)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user