Rename backend code references: Bookmann → Bookhoard
Backend changes: - Update import paths: bookmann/internal → bookhoard/internal - Rename struct fields: BookmannUUID → BookhoardUUID - Update handler function names: mapContentIdToBookmannUUID → mapContentIdToBookhoardUUID - Update HTTP response headers: X-Bookmann-* → X-Bookhoard-* - Update service and middleware references - Update main.go imports and references This is part 2 of the project rename to Bookhoard.
This commit is contained in:
+10
-10
@@ -1,9 +1,9 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"bookmann/internal/database"
|
||||
"bookmann/internal/opds"
|
||||
"bookmann/internal/services"
|
||||
"bookhoard/internal/database"
|
||||
"bookhoard/internal/opds"
|
||||
"bookhoard/internal/services"
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
@@ -137,7 +137,7 @@ func (h *OPDSHandler) GetDeviceCatalog(c echo.Context) error {
|
||||
// Create OPDS feed
|
||||
feed := opds.NewFeed(
|
||||
fmt.Sprintf("urn:uuid:%s", deviceID),
|
||||
"Bookmann Library",
|
||||
"Bookhoard Library",
|
||||
)
|
||||
|
||||
// Add feed links
|
||||
@@ -187,7 +187,7 @@ func (h *OPDSHandler) GetDeviceCatalog(c echo.Context) error {
|
||||
|
||||
// Add SHA-256 metadata
|
||||
if item.FileSha256.Valid {
|
||||
entry.AddMetadata("bookmann:sha256", item.FileSha256.String)
|
||||
entry.AddMetadata("bookhoard:sha256", item.FileSha256.String)
|
||||
}
|
||||
|
||||
// Add collections as categories
|
||||
@@ -305,7 +305,7 @@ func (h *OPDSHandler) SearchDeviceCatalog(c echo.Context) error {
|
||||
entry.SetIdentifier(bookUUID)
|
||||
|
||||
if item.FileSha256.Valid {
|
||||
entry.AddMetadata("bookmann:sha256", item.FileSha256.String)
|
||||
entry.AddMetadata("bookhoard:sha256", item.FileSha256.String)
|
||||
}
|
||||
|
||||
collections, err := h.db.GetCollectionsForBook(c.Request().Context(), pgtype.UUID{Bytes: item.ID.Bytes, Valid: true})
|
||||
@@ -466,12 +466,12 @@ func (h *OPDSHandler) DownloadBook(c echo.Context) error {
|
||||
filename := filepath.Base(filePath)
|
||||
c.Response().Header().Set("Content-Type", mimeType)
|
||||
c.Response().Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
|
||||
c.Response().Header().Set("X-Bookmann-UUID", bookUUID.String())
|
||||
c.Response().Header().Set("X-Bookhoard-UUID", bookUUID.String())
|
||||
|
||||
if format == "kepub" && fileSha256 != "" {
|
||||
c.Response().Header().Set("X-Bookmann-KEPUB-SHA256", fileSha256)
|
||||
c.Response().Header().Set("X-Bookhoard-KEPUB-SHA256", fileSha256)
|
||||
} else if fileSha256 != "" {
|
||||
c.Response().Header().Set("X-Bookmann-SHA256", fileSha256)
|
||||
c.Response().Header().Set("X-Bookhoard-SHA256", fileSha256)
|
||||
}
|
||||
|
||||
// Stream file
|
||||
@@ -595,7 +595,7 @@ func (h *OPDSHandler) GetDeviceNavigation(c echo.Context) error {
|
||||
// Create OPDS navigation feed
|
||||
feed := opds.NewFeed(
|
||||
fmt.Sprintf("urn:uuid:%s", deviceID),
|
||||
"Bookmann Library Navigation",
|
||||
"Bookhoard Library Navigation",
|
||||
)
|
||||
|
||||
// Add feed links
|
||||
|
||||
Reference in New Issue
Block a user