* feat: remove nginx and serve Angular directly from Spring Boot
* fix: handle null values in EnabledFields deserialization from persisted JSON
* fix(migration): auto-repair failed Flyway migrations on startup
* fix(migration): replace DB triggers with app-level orphan cleanup
* fix: restore default port to 6060 for backwards compatibility
* fix: align all port references to 6060 and add OPDS compression MIME types
* fix: resolve NG0101 recursive tick error in book browser selection
---------
Co-authored-by: acx10 <acx10@users.noreply.github.com>
* refactor: simplify RestTemplate and ObjectMapper configurations, add no-args constructors to progress classes
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* chore: update Gradle and Java versions in Docker configuration and build files
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* test: enhance header assertions in tests and add spring-boot-test-autoconfigure dependency
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor(tests): migrate to SpringBootTest and update entity management in test cases
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* test: update test property configurations for H2 database in Healthcheck and BookOpds repository tests
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* test: clean up HealthcheckControllerTest by removing unnecessary whitespace and comments
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* test: remove unnecessary whitespace in HealthcheckControllerTest
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* chore: downgrade Flyway version from 12.0.0 to 11.14.1 in build.gradle
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* chore: downgrade Flyway version from 12.0.0 to 11.14.1 in build.gradle
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add @DependsOn annotation for Flyway in MultipartConfig
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add @DependsOn annotation for Flyway in LibraryService
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add test configuration for Flyway in HealthcheckControllerTest
chore: remove unused path variable in deleteLibrary method of LibraryService
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: configure Flyway migration and update test configuration
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: enable remote debugging in bootRun configuration
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: update Flyway version and enhance ObjectMapper configuration
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: remove @DependsOn annotation for Flyway in MultipartConfig and LibraryService
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add NoArgsConstructor and AllArgsConstructor annotations to DTO classes
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add NoArgsConstructor and AllArgsConstructor annotations to FileProcessResult, MetadataUpdateContext, and MetadataUpdateWrapper classes
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add DependsOnDatabaseInitialization annotation to MultipartConfig, AppSettingService, LibraryService, and JwtSecretService classes
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add DependsOnDatabaseInitialization annotation to MultipartConfig and CronService classes
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: implement lazy initialization and thread safety for JWT secret retrieval
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add Flyway dependency and update LibraryService initialization to use ApplicationReadyEvent
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor: remove outdated comments from JwtSecretService class
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor: migrate from com.fasterxml.jackson to tools.jackson for JSON processing
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor: remove unused ObjectMapper bean and related imports from JacksonConfig
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: configure async support with VirtualThreadTaskExecutor in WebMvcConfig
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: enhance application performance with virtual threads and HTTP/2 support
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add JsonSetter annotation to skip null values for triggeredByCron field
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add triggeredByCron field to TaskCreateRequest and initialize in task management
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: enable Spring Data web support with DTO serialization in WebMvcConfig
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor(UserDefaultsService): simplify class structure and remove unused methods
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor(BookOpdsRepositoryDataJpaTest): simplify test setup and use TestEntityManager
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor(BookOpdsRepositoryDataJpaTest): update test configuration and simplify entity persistence
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor: update Jackson dependencies and migrate to Jackson 3
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor(build.gradle): update jackson-annotations dependency to use Jackson 3 BOM
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor(BookOpdsRepositoryDataJpaTest): remove unused ObjectMapper bean definition
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor(LibraryService): simplify library deletion logic
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor(book): extract file-specific information from book
First commit in a series aimed at refactoring the data model for books.
More specifically, the idea is to extract all file-specific information
from the `book` table and move it to the `book_file` table, previously named `book_additional_file`
The aim is to make it easier to:
* Improve support for books with multiple file formats (PDF, EPUB, etc) for all interactions (Read, Download, etc)
* Support for merging/unmerging books
* Add support for additional file types
* Specify preferred formats at the user level
Ref: #489
* refactor(book): ensure the API build and runs
Further work on the refactoring aimed at separating file-related details
from the `book` table.
With this commit all the missing changes that were prventing the API to build
or to book have been addressed.
TODO: test extensively, adjust existing unit tests and add new ones
* fix(read): add mapping for book format
This restores the read functionality which relies on the book format field
to decide which reader to use.
* fix: fix read, dowload and file upload
This commit fixes multiple issues either caused by the refactoring or pre-existing:
* Fix the Read button behaviour after the refactoring
* Unregister the watcher process when uploading additional formats
* Fix downloading of additional book formats (using the wrong ID)
* fix: adjust tests to use the new BookFileEntity class
All the tests that used to fecth file information from BookEntity
now need to get them from the relevant BookFileEntity
* fix: do not rely on AdditionalFileType
* Use the BookFileEntity bookFormat instead
* fix: use the relevant BookFileEntity class
* fix: call the right methods
* fix: Add missing mapping for the test
* fix: adapt the test to the new semantics
All book files, including the primary one, are treated as equal now.
The tests needs to take that into account when checking for additional
formats.
* fix: use mutable lists
* fix: fix syntax for droppung unique constraint
MariaDB uses indexes, not constraints
* fix: regression on book file ordering
We want to make this refactoring 100% compatible with the current behaviour (modulo a few bugs),
therefore we need to maintain the right order to ensure the "primary" book stays the same
after the migration.
* fix: allow download of supplementary files
* fix(opds): replace removed additionalFiles entity graph with bookFiles
- Update BookOpdsRepository @EntityGraph paths to use BookEntity.bookFiles after the refactor
- Add @DataJpaTest to validate BookOpdsRepository wiring and catch invalid EntityGraph attributes
- Add H2 as testRuntimeOnly dependency so the JPA slice test can run with an embedded DB
* chore(bookdrop): mount bookdrop folder from a local directory
It's consistent with the library dir, and makes debugging easier
when working on the local environment
* fix: rename migration after rebase
It's no longer 66, bumped to 73
* fix: handle BookEntity primary file NPEs after rebase
Adjust tests to always instanciate BookFileEntity when manipulating
BookEntity.
* chore: rename migration to avoid conflict
V73 is already taken on develop, V67 was left "unused"
* chore: rename again to ensure it's applied
* fix: make sure to flush the data to DB
Without the flush there is a high chance of leaving the DB in an inconsistent
state after a book move.
* fix: move all files belonging to a book
This fixes a pre-existing bug which has some nasty ramifications.
We never moved "additional files" when changing library for a book entity,
causing them to become effectively "unreacheable" from the UI.
* fix(migration): remove the unique index before importing data
* fix: fix build and test after rebase
* fix(migration): drop legacy table
* fix(upload): use the templetized name when storing on DB
* fix(rebase): Add logical fixes post rebase
* Adapt the code to properly handle the new `archive_type` field and logic
* Bump the version number for the DB migration
* Use `getPrimaryBookFile()` whenever trying to access book files
* fix(migration): Handle additional book formats
* Add support for FB2 files
* Corretly handle cb7 files as CBX
* fix(file mover): fix a regression when moving books across categories
The previous approach would trigger the JPA's `orphanRemoval` parameter on the
bookEntities, effetively triggering a delete on the DB.
This caused files to be moved but the data on the DB would get stale, also causing
additional formats to be treated as separate books upon a rescan.
* fix(rescan): do not delete alternative files on rescan
Upon library rescan, additional files such as images were removed from
book entities association when using the "Each file is a book" library structure.