diff --git a/internal/index/bleve_write.go b/internal/index/bleve_write.go index 9c71151..ca4ce43 100644 --- a/internal/index/bleve_write.go +++ b/internal/index/bleve_write.go @@ -107,8 +107,8 @@ func indexAuthors(document Document, index func(id string, data interface{}) err Slug: document.AuthorsSlugs[i], Type: "author", } - err := index(author.Slug, author) - if err != nil { + + if err := index(author.Slug, author); err != nil { log.Printf("Error indexing author %s: %s\n", name, err) return err } diff --git a/internal/webserver/controller.go b/internal/webserver/controller.go index 7a734ab..43bba61 100644 --- a/internal/webserver/controller.go +++ b/internal/webserver/controller.go @@ -54,11 +54,6 @@ func SetupControllers(cfg Config, db *gorm.DB, metadataReaders map[string]metada authorsCfg := author.Config{ WordsPerMinute: cfg.WordsPerMinute, - LibraryPath: cfg.LibraryPath, - HomeDir: cfg.HomeDir, - CoverMaxWidth: cfg.CoverMaxWidth, - Hostname: cfg.Hostname, - Port: cfg.Port, } homeCfg := home.Config{ diff --git a/internal/webserver/controller/author/controller.go b/internal/webserver/controller/author/controller.go index 49b3eba..bf298e1 100644 --- a/internal/webserver/controller/author/controller.go +++ b/internal/webserver/controller/author/controller.go @@ -15,9 +15,6 @@ type Sender interface { type IdxReaderWriter interface { SearchByAuthor(authorSlug string, page, resultsPerPage int) (result.Paginated[[]index.Document], error) Author(slug string) (index.Author, error) - Count(t string) (uint64, error) - Close() error - Documents(IDs []string) (map[string]index.Document, error) } type highlightsRepository interface { @@ -26,11 +23,6 @@ type highlightsRepository interface { type Config struct { WordsPerMinute float64 - LibraryPath string - HomeDir string - CoverMaxWidth int - Hostname string - Port int } type Controller struct { diff --git a/internal/webserver/embedded/views/document.html b/internal/webserver/embedded/views/document.html index 9b7d17d..407a4c5 100644 --- a/internal/webserver/embedded/views/document.html +++ b/internal/webserver/embedded/views/document.html @@ -138,8 +138,13 @@