Drop PDF support, EPUB only
Docker Image bauen und veröffentlichen / docker (push) Successful in 2m38s

- internal/library: ListBooks only scans .epub files, dropping the
  pdf-specific metadata branch (epub metadata reading is now
  unconditional)
- internal/web: uploadSubmit rejects non-.epub uploads with updated
  error message
- views: upload form/file input and empty-library hint now reference
  only EPUB; templ regenerated
- README/copilot-instructions updated to reflect EPUB-only scope

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-08-15 11:50:27 +02:00
co-authored by Copilot
parent e4fe39ecc5
commit a51578cbf1
6 changed files with 19 additions and 24 deletions
+9 -11
View File
@@ -44,7 +44,7 @@ func (s *Service) ListBooks() ([]Book, error) {
}
ext := strings.ToLower(filepath.Ext(e.Name()))
if ext != ".epub" && ext != ".pdf" {
if ext != ".epub" {
continue
}
@@ -55,17 +55,15 @@ func (s *Service) ListBooks() ([]Book, error) {
hasCover := false
title := fallbackTitle
if ext == ".epub" {
meta, err := readEPUBMetadata(fullPath)
if err == nil {
if strings.TrimSpace(meta.Title) != "" {
title = strings.TrimSpace(meta.Title)
}
if strings.TrimSpace(meta.Author) != "" {
author = strings.TrimSpace(meta.Author)
}
hasCover = meta.HasCover
meta, err := readEPUBMetadata(fullPath)
if err == nil {
if strings.TrimSpace(meta.Title) != "" {
title = strings.TrimSpace(meta.Title)
}
if strings.TrimSpace(meta.Author) != "" {
author = strings.TrimSpace(meta.Author)
}
hasCover = meta.HasCover
}
books = append(books, Book{