Commit Graph
17 Commits
Author SHA1 Message Date
Alexander PuzyniaandAditya Chandel 694ee11540 Book additional files support library (3/3) (#872)
* feat(api/model): add new entity BookAdditionalFileEntity

* feat(api/db): add book additional file repository

* feat(api/db): add migration

* test(api/db): add book additional file repository test

* test(api/db): add book additional file repository tests for hash uniqueness

* feat(api/domain): add support to additional file model

* feat(api): add additional files controller

* refactor(api): move addAdditionalFile to FileUploadService as uploadAdditionalFile method

* feat(service): search book by additional file

* feat(services): process deleted additional files with ability to promote alternative formats to book instead of deleting them

* refactor(util): use common code to resolve patter for entity and domain object

* feat(service): move additional files

* test(service): test move additional files along with book itself

* feat(ui/domain): add alternativeFormats and supplementaryFiles to book model

* feat(ui/domain): add download additional file method to book service

* refactor(api/domain): extract FileInfo interface with common fields

Allow to share the same interface thet is implemented by AdditionFile and Book

* feat(ui): show multiple download options

* feat(ui/domain): add delete additional file method to book service

* feat(ui): add delete additional file ui

* feat(ui): add additional-file-uploader.component

* feat(ui/domain): add uploadAdditionalFile to the service

* feat(ui): add Upload File menu item

* feat(ui): show supplementary files in download menu item

* feat(ui): show supplementary files in delete file menu item

* feat(ui): book card allow to select single file to download or delete

* feat(api/domain): add scan mode and default book format to the library

* feat(ui): select scan mode and default book format

* feat(api): create/update library settings

* refactor(services): get processor based on scan mode

* feat(services): read all files if processor supports supplimentary files

* fix(services): detectNewBookPaths should check additional files as well

* feat(services): implement folder as book file processor

* test(service): add tests for FolderAsBookFileProcessor

* feat(services): allow follow links for search library files

* test(library): add tests for folder as book file processor

* refactor(library): use Path instead of String for directory path

* feat(library): sort directories before processing

* feat(library): reuse library file book type

* fix(library): do not add additional format if it is used in another book

* test(library): test same hashes files

* refactor(library): simplify FolderAsBookFileProcessor

* test(library): add test with deep folder structure

* test(library): add additional files to existing book

---------

Co-authored-by: Aditya Chandel <8075870+adityachandelgit@users.noreply.github.com>
2025-08-27 08:20:29 -06:00
Alexander Puzynia f725ececf5 Book additional files support UI (2/3) (#870)
* feat(api/model): add new entity BookAdditionalFileEntity

* feat(api/db): add book additional file repository

* feat(api/db): add migration

* test(api/db): add book additional file repository test

* test(api/db): add book additional file repository tests for hash uniqueness

* feat(api/domain): add support to additional file model

* feat(api): add additional files controller

* refactor(api): move addAdditionalFile to FileUploadService as uploadAdditionalFile method

* feat(service): search book by additional file

* feat(services): process deleted additional files with ability to promote alternative formats to book instead of deleting them

* refactor(util): use common code to resolve patter for entity and domain object

* feat(service): move additional files

* test(service): test move additional files along with book itself

* feat(ui/domain): add alternativeFormats and supplementaryFiles to book model

* feat(ui/domain): add download additional file method to book service

* refactor(api/domain): extract FileInfo interface with common fields

Allow to share the same interface thet is implemented by AdditionFile and Book

* feat(ui): show multiple download options

* feat(ui/domain): add delete additional file method to book service

* feat(ui): add delete additional file ui

* feat(ui): add additional-file-uploader.component

* feat(ui/domain): add uploadAdditionalFile to the service

* feat(ui): add Upload File menu item

* feat(ui): show supplementary files in download menu item

* feat(ui): show supplementary files in delete file menu item

* feat(ui): book card allow to select single file to download or delete
2025-08-27 08:11:43 -06:00
Alexander Puzynia b81a8d1422 Book additional files support (1/3) (#868)
* feat(api/model): add new entity BookAdditionalFileEntity

* feat(api/db): add book additional file repository

* feat(api/db): add migration

* test(api/db): add book additional file repository test

* test(api/db): add book additional file repository tests for hash uniqueness

* feat(api/domain): add support to additional file model

* feat(api): add additional files controller

* refactor(api): move addAdditionalFile to FileUploadService as uploadAdditionalFile method

* feat(service): search book by additional file

* feat(services): process deleted additional files with ability to promote alternative formats to book instead of deleting them

* refactor(util): use common code to resolve patter for entity and domain object

* feat(service): move additional files

* test(service): test move additional files along with book itself
2025-08-27 08:11:04 -06:00
Alexander PuzyniaandAditya Chandel 60f8442514 Upgrade primeng to 20.0.1 (#903)
* build(npm): add missed packages

* build(npm): upgrade primeng to 20.0.1

* feat(ui): upgrade ui to support 20 primeng

https://primeng.org/migration/v19#compatible

* fix(ui): p-input value max requires value

* refactor(ui): remove unused component imports

* build(npm): allow common js dependencies

* style(ui): fix some warnings

* fix(ui): replace chips with autoComplete

---------

Co-authored-by: Aditya Chandel <8075870+adityachandelgit@users.noreply.github.com>
2025-08-14 12:10:45 -06:00
Alexander PuzyniaandCopilot a5003cb2aa style(services): remove unused usings
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-23 14:11:27 -06:00
Alexander PuzyniaandCopilot c1796769dc style(services): remove unused usings
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-23 14:11:27 -06:00
Alexander PuzyniaandCopilot 0cfec8bcd8 style(services): remove unused usings
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-23 14:11:27 -06:00
Alexander Puzynia f4207cf9b3 refactor(services): update BookFileProcessor to use BookFileType for processor retrieval 2025-07-23 14:11:27 -06:00
Alexander Puzynia 3f23e4a3eb refactor(services): add LibraryFileProcessorRegistry to get processor based on scan mode 2025-07-23 14:11:27 -06:00
Alexander Puzynia d6c3c8e4c6 test(service): add unit tests for FileAsBookProcessor to validate library file processing 2025-07-23 14:11:27 -06:00
Alexander Puzynia 31e4ae2972 refactor(service): integrate BookFileProcessorRegistry for handling multiple book file formats 2025-07-23 14:11:27 -06:00
Alexander Puzynia 3d17159c59 refactor(services): add common BookFileProcessorRegistry for all current and future book file processors 2025-07-23 14:11:27 -06:00
Alexander Puzynia b7a17e1405 refactor(service): use full path instead of just name to sync book files 2025-07-23 14:11:27 -06:00
Alexander Puzynia c9e05b1c28 refactor(library): extract processLibraryFiles into separate FileAsBookProcessor class 2025-07-23 14:11:27 -06:00
Alexander Puzynia f084bb1da6 refactor(library): remove checked IOException 2025-07-23 14:11:27 -06:00
Alexander Puzynia 395fcca80d refactor(api/services): don't scan library files twice on rescan 2025-07-23 14:11:27 -06:00
Alexander Puzynia 2e7bad742b File processing minor refactoring (#751)
* refactor(service): remove finishAndReturnBook to avoid hash calculation twice
* refactor(service): remove forceProcess argument cause it always passed as false
* refactor(services): merge FileProcessor into BookFileProcessor
2025-07-23 12:15:13 -06:00