From ebad597f26b7a4fc0c1547243c7fa3b2a81e73d0 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 30 Dec 2019 14:40:00 +0800 Subject: [PATCH] rename book metadata to media, to avoid confusion later on when proper metadata is added rename parser to analyzer, using the same vocabulary as plex deprecation of komga.threads.parse configuration key in favor of komga.threads.analyzer added created date and fileLastModified date to SeriesDto and BookDto deprecation of ready_only parameter in /series/{id}/books in favor of media_status, this will enable better filtering in the web ui --- README.md | 4 +- komga-webui/src/components/BrowseBook.vue | 12 ++--- komga-webui/src/components/BrowseSeries.vue | 2 +- komga-webui/src/components/CardBook.vue | 12 ++--- .../src/services/komga-series.service.ts | 4 +- komga-webui/src/types/komga-books.ts | 4 +- komga-webui/src/views/BookReader.vue | 12 ++--- .../org/gotson/komga/domain/model/Book.kt | 4 +- .../gotson/komga/domain/model/Exceptions.kt | 4 +- .../model/{BookMetadata.kt => Media.kt} | 10 ++-- .../domain/persistence/BookRepository.kt | 8 ++-- ...tadataRepository.kt => MediaRepository.kt} | 4 +- .../komga/domain/service/AsyncOrchestrator.kt | 6 +-- .../{BookParser.kt => BookAnalyzer.kt} | 46 +++++++++---------- .../komga/domain/service/BookLifecycle.kt | 30 ++++++------ .../komga/domain/service/LibraryLifecycle.kt | 2 +- .../komga/domain/service/LibraryScanner.kt | 18 ++++---- .../async/AsyncConfiguration.kt | 8 ++-- .../configuration/KomgaProperties.kt | 4 ++ .../scheduler/PeriodicScannerController.kt | 2 +- .../interfaces/web/opds/OpdsController.kt | 10 ++-- .../interfaces/web/rest/BookController.kt | 20 ++++---- .../gotson/komga/interfaces/web/rest/Dto.kt | 31 ++++++++++--- .../interfaces/web/rest/SeriesController.kt | 10 ++-- komga/src/main/resources/application-dev.yml | 3 +- komga/src/main/resources/application.conf | 4 +- ...191230131239__rename_metadata_to_media.sql | 25 ++++++++++ 27 files changed, 175 insertions(+), 124 deletions(-) rename komga/src/main/kotlin/org/gotson/komga/domain/model/{BookMetadata.kt => Media.kt} (90%) rename komga/src/main/kotlin/org/gotson/komga/domain/persistence/{BookMetadataRepository.kt => MediaRepository.kt} (58%) rename komga/src/main/kotlin/org/gotson/komga/domain/service/{BookParser.kt => BookAnalyzer.kt} (68%) create mode 100644 komga/src/main/resources/db/migration/V20191230131239__rename_metadata_to_media.sql diff --git a/README.md b/README.md index 8738ae26c..f013f2a24 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ In order to make Komga run, you need to specify some mandatory configuration key You can also use some optional configuration keys: - `KOMGA_LIBRARIES_SCAN_CRON` / `komga.libraries-scan-cron`: a [Spring cron expression](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/scheduling/support/CronSequenceGenerator.html) for libraries periodic rescans. `0 0 * * * ?` will rescan every hour. `0 */15 * * * ?` will rescan every 15 minutes. Defaults to `0 */15 * * * ?` in `prod` profile. -- `KOMGA_THREADS_PARSE` / `komga.threads.parse`: the number of worker threads used for book parsing. Defaults to `2`. You can experiment to get better performance. +- `KOMGA_THREADS_ANALYZER` / `komga.threads.analyzer`: the number of worker threads used for analyzing books. Defaults to `2`. You can experiment to get better performance. - `KOMGA_LIBRARIES_SCAN_DIRECTORY_EXCLUSIONS` / `komga.libraries-scan-directory-exclusions`: a list of patterns to exclude directories from the scan. If the full path contains any of the patterns, the directory will be ignored. If using the environment variable form use a comma-separated list. - `KOMGA_FILESYSTEM_SCANNER_FORCE_DIRECTORY_MODIFIED_TIME` / `komga.filesystem-scanner-force-directory-modified-time`: if set to `true`, it will force the last modified time of a directory as the maximum from its own last modified time and the last modified time from all the books inside the directory. This should be used only if your filesystem does not update the last modified time of a directory when files inside it are modified (Google Drive for instance). @@ -86,7 +86,7 @@ Komga will generate: On rescans, Komga will update Series and Books, add new ones, and remove the ones for which files don't exist anymore. -Then it will _parse_ each book, which consist of indexing pages (images in the archive), and generating a thumbnail. +Then it will _analyze_ each book, which consist of indexing pages (images in the archive), and generating a thumbnail. ## Security diff --git a/komga-webui/src/components/BrowseBook.vue b/komga-webui/src/components/BrowseBook.vue index c0e28ecb0..f83d3553f 100644 --- a/komga-webui/src/components/BrowseBook.vue +++ b/komga-webui/src/components/BrowseBook.vue @@ -51,7 +51,7 @@ mdi-book-open - {{ book.metadata.pagesCount }} pages + {{ book.media.pagesCount }} pages @@ -70,11 +70,11 @@ FORMAT -