Commit Graph

258 Commits

Author SHA1 Message Date
Joseph Milazzo 8f4d42d13f Add noreferrer noopener on links to external resources for epub reading (#318) 2021-06-20 15:15:34 -05:00
Joseph Milazzo 0c88d91278 Ignore .DS_Store and @eaDir folders when scanning directories. (#314) 2021-06-18 09:49:30 -05:00
Joseph Milazzo 1036c731ad When performing a download, if there is only 1 file, don't zip it and send back the raw file. (#315) 2021-06-18 09:49:19 -05:00
Joseph Milazzo 6e1b227e65 Transaction Support (#309)
* Added transactions to UnitOfWork and refactored code to use it.

* This included blank UI fix from Kavita-webui
2021-06-18 07:37:48 -05:00
Joseph Milazzo becf2ec7a6 Changed how series parsing works. Now at the end of the Parse() call, if we still haven't figured out the Series, we will default to taking the file name and cleaning it. This allows files that have no numbers to be picked up. (#310)
Series Parsing now, at the end of the Parse() call if we still haven't figured out the Series, will default to taking the file name and cleaning it. This allows files that have no numbers to be picked up.
2021-06-16 10:58:50 -05:00
Joseph Milazzo d02d2d3cb5 Epub 3.2 Collection Tag support (#308)
* Hooked up logic for collections based on EPUB3.2 Spec and Fixed improper tags in EPUBs since it is XML and we are using HTML to parse it.

* Fixed a bug with src:url url replacing so that it's much cleaner regex
2021-06-15 09:51:37 -05:00
Joseph Milazzo 584348c6ad Special Marker Changes (#306)
* SP# is now a way to force the file to be a special rather than pushing it into a Specials folder.

* Made it so if there is a Special (for any Parse call), volume and chapters will be ignored.

* Fixed a unit test missing Theory and fixed a regex case
2021-06-14 21:12:37 -05:00
Joseph Milazzo 46b60405b1 Special Markers (#305)
* Removed "Anthology" from being a special parsing keyword as series are being found where "Anthology" is in the series name.

* SP# is now a way to force the file to be a special rather than pushing it into a Specials folder.
2021-06-14 17:35:13 -05:00
Joseph Milazzo f8aba21acd Removed "Anthology" from being a special parsing keyword as series are being found where "Anthology" is in the series name. (#304) 2021-06-14 17:21:01 -05:00
Joseph Milazzo 16a77fa8d6 Download Support (#298)
* Implemented the ability to download files (series, volume, chapter)

* Added RBS checks to ensure user is either an admin or has download role

* Added the ability to change a users feature RBS. Changed the Role seed to use reflection
2021-06-10 07:47:35 -05:00
Joseph Milazzo 8d8e7ce93b Book Grouping (#292)
* Implemented the ability to group books by series if certain calibre tags are in the epub.
2021-06-08 12:33:54 -05:00
Robbie Davis 4f29cf7cc7 Bugfix/manga reader pad zeros (#288)
* Switched to using existing NaturalSortComparer for ordering filenames before we reprocess them to ensure they are in the correct natural reading order.

Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
2021-06-08 08:59:47 -05:00
Joseph Milazzo 7dae1da92f Logging Enhancements (#285)
* If the user is on Debug, allow logging DB params to the logger. Implemented the ability to change logger from UI and to keep the DB settings of LogLevel and Port in sync with appsettings.

* Exclude a lot more clutter from hitting Sentry

* Removed github action

* Small cleanup
2021-06-07 17:52:11 -05:00
Joseph Milazzo 6f124b6f8a Add try catch on Parser MinimumNumberFromRange in case something weird gets put in here. (#283) 2021-06-07 16:12:07 -05:00
Joseph Milazzo 41a5d1bf2c Fixed a bug on getting next/previous chapters where if chapters were … (#281)
* Fixed a bug on getting next/previous chapters where if chapters were not inserted into the DB in the natural order, then the next/prev chapter would be skewed.

* Make GetNextChapterId static
2021-06-07 14:49:38 -05:00
Joseph Milazzo 5259a1484a Implemented the ability to configure the default port for non-docker users. Docker users will always be 5000. (#280) 2021-06-07 14:36:35 -05:00
Joseph Milazzo 4606b54603 Removed the SeriesMetadata migration since users have updated to v0.4.1. Any other users will require a scan to get the SeriesMetadata generated. (#275) 2021-06-07 13:16:50 -05:00
Joseph Milazzo e4a9c468fe Version bump and reduced some sentry logs 2021-06-07 11:32:26 -05:00
Joseph Milazzo f0f74e867e Fixed the constraint issue with Metadata and ensure we log parameters on development modes. (#273) 2021-06-06 16:13:07 -05:00
Joseph Milazzo 8175ddf517 Fixed a critical crash in Scan library where Series Metadata was getting regenerated and unique constraint failed. (#269) 2021-06-05 16:30:50 -05:00
Joseph Milazzo aa7439178c Don't log exceptions to Sentry when debugging locally. Fixed a constraint issue with collection tags that prevented deleting series. Ensure when we scan we add SeriesMetadata objects to existing series. (#265) 2021-06-04 17:49:19 -05:00
Robbie Davis 606e4c8b12 Recently Added Page (#261)
- Updated route task for 'recently-added'.
- Refactored GetRecentlyAdded task instead of creating new API task. This way is more efficient and prevents bloat.
- Adding pageSize to UserParams.cs (got lost in PRs).
2021-06-04 10:09:33 -05:00
Joseph Milazzo e6cfa4feca Bugfix/anchor rewriting (#260)
* Added book reader reading direction preference

* Adds a new marker to the AppUserProgress to capture nearest anchor for resuming scroll point when reading books. Refactored bookmark api to return a BookmarkDto which includes this new data.

* Fixed the readme image displaying issue and changed up a bit more of the layout.
2021-06-03 18:33:24 -05:00
Joseph Milazzo 4910f1d1d0 Book Reading Progress Enhancement (#259)
* Added book reader reading direction preference

* Adds a new marker to the AppUserProgress to capture nearest anchor for resuming scroll point when reading books. Refactored bookmark api to return a BookmarkDto which includes this new data.
2021-06-03 18:33:13 -05:00
Leonardo Dias c12879cda9 feat: remove Webtoon option from Library Types (#254)
Fixes #251
2021-06-03 15:46:57 -05:00
Leonardo Dias b38ea8186e fix: error when resetting password of a non admin user (#252)
Fixes #246
2021-06-03 12:17:57 -05:00
Joseph Milazzo 03c9b7a11d Added book reader reading direction preference (#249) 2021-06-03 09:05:07 -05:00
Leonardo Dias 16d6b26c63 fix: wrong password length validation when registering a new user or resetting password (#247)
#244

Co-authored-by: leo2d <contato.leonardod@yahoo.com>
2021-06-03 07:16:32 -05:00
Joseph Milazzo 5083608f24 Bugfix/sentry and fixes (#243)
* Generate SeriesMetadata when creating Series from Scanner.

* Ignore errors from BookService

* Fixed a case where we used First() when it should have been FirstOrDefault() to fail when there are no cover images (or images)
2021-06-01 19:42:43 -05:00
Joseph Milazzo ce35c4f84a CB7 Support (#241)
* Added CB7 file extension support
2021-06-01 08:37:46 -05:00
Joseph Milazzo aaad82cb7a Reduce Unauthenticated Errors in Sentry (#238)
* Updated README to be explicit that kavita.db needs to be writable.

* Implemented a new Exception type that is for throwing a message to UI without logging in Sentry.
2021-06-01 06:57:46 -05:00
Joseph Milazzo 0a39a17407 TokenKey Generation (#235)
* Fixed #223. Now we generate a 128 byte JWT token key (recommendation) for user on first run.
2021-05-31 10:14:39 -05:00
Joseph Milazzo d7d7f9b529 Collection Support (#234)
* Readme refactored to be more clean and clear, taking inspiration from wiki.js's readme.

* Initial backend for Collections and basic metadata implemented.

* More build flavors for Raspberry Pi users and updated Install since we don't need users to set their own JWT Token Key. Update a typo in appsettings.json file for prod.

* Fixed #224. Sort before getting a First?Last() chatper

* The rough ability to add and get series metadata and tags.

* Fix a bug on getting metadata for when it doesn't exist.

* Fixed a bug where flattening directories with some unique filenames could cause reading order of images to be out of order.

* Added a seed code to ensure all series have SeriesMetdata

* Ensure all instances of opening an epub is using "using" so we don't lock the file. When we have a malformed html file, log the issues and inform the user we can't open the file.

* Book reader now handles @Import "" statements in CSS and inlines the css into css file that references them. This allows for them to be scoped. In addition, if the html or body tag had classes, we now send back a single div with those classes.

* Fixed GetSeriesDtoForCollectionAsync which was not properly returning series

* Implemented cover image for collection tag. Fixed an issue in metadata update call.

* Add check for user access when resolving series for a collection tag. When asking for all tags, if the user is not an admin, only give promotoed tags back.

* Implemented updateTag api

* Implemented the ability to update series the tags have access to.

* Cleanup, sorting, and null check

* More sorting changes

* Ensure we can delete tags when editing a series tags

* Fix order of update to make sure a tag is properly deleted

* Code smells
2021-05-30 17:24:23 -05:00
Joseph Milazzo 3c375da10c Bugfix/appsettings (#229)
* More build flavors for Raspberry Pi users and updated Install since we don't need users to set their own JWT Token Key. Update a typo in appsettings.json file for prod.
2021-05-20 18:16:00 -05:00
Joseph Milazzo 50af2f8ca5 Fixed #224. Sort before getting a First?Last() chatper (#228) 2021-05-20 18:09:15 -05:00
Joseph Milazzo fdc925812d Bugfix: Flatten wasn't consistent (#227)
* Ensure that when caching, the order of the cached files remains the same way as if we manually navigated through nested folders.
2021-05-20 18:01:14 -05:00
Joseph Milazzo 77c52717ce MinimumNumberFromRange exception (#222)
* More regex! Bonus is now a keyword for specials

* Regex enhancement, Sort chapters on next/prev chapter to ensure they always in proper order, and don't set JWT on starup when in development mode.

* Fixes KAVITA-H. Check to ensure non numeric characters are not in range string before attempting to parse a float out.
2021-05-17 09:31:16 -05:00
Joseph Milazzo 308e2b48a0 Bugfixes (#221)
* More regex! Bonus is now a keyword for specials

* Regex enhancement, Sort chapters on next/prev chapter to ensure they always in proper order, and don't set JWT on starup when in development mode.
2021-05-16 16:45:39 -05:00
Joseph Milazzo 2f793af34c More regex! Bonus is now a keyword for specials (#220) 2021-05-16 13:13:19 -05:00
Joseph Milazzo 03b49a5268 Implemented the ability to change the JWT key on runtime. (#217)
* Implemented the ability to change the JWT key on runtime.

* Added .7z file extension support

* Cleanup

* Added Feathub link

* Code cleanup

* Fixed up a build issue on CI
2021-05-14 08:07:03 -05:00
Joseph Milazzo 98e8b7297b Tell sentry to ignore some noisy messages, add a bounds check on an API, and tweak some ERRORs to be WARNINGs to better reflect their severity. (#216) 2021-05-13 11:36:16 -05:00
Joseph Milazzo beca4a4de5 Bugfix/parser (#214)
* Fixed #211

* Fixed #213. Somehow a + 1 got removed
2021-05-11 15:57:11 -05:00
Joseph Milazzo c8adaee3eb Sentry Integration (#212)
* Fixed a parsing case

* Integrated Sentry into the solution with anonymous users. Fixed some parsing issues and added BuildInfo into a separate project.

* Fixed some bad parser regex

* Removed bad reference to NLog

* Cleanup of some files not needed
2021-05-11 14:45:18 -05:00
Joseph Milazzo 6fc5e535df Fixed #206 (#207) 2021-05-10 09:50:26 -05:00
Joseph Milazzo ecc399b32a Fixed #204. Raised max password to 32 characters (#205) 2021-05-09 11:26:22 -05:00
Joseph Milazzo 8b1fbc0096 Implemented Dark Mode (#203) 2021-05-09 08:44:12 -05:00
Joseph Milazzo e37931b0da Regex addition (#200) 2021-05-06 16:51:16 -05:00
Joseph Milazzo f694145cd9 Feature/tech debt (#199)
* Added an icon for building the exe

* Technical debt
2021-05-05 21:00:50 -05:00
Joseph Milazzo d92e9e7602 Implemented the ability to move between volumes (reading) automatically without existing the app. (#198) 2021-05-05 16:48:39 -05:00
Joseph Milazzo 2be1630af3 Tap to Paginate User Pref (#197)
* Fixed In Progress and removed comments

* Tap to Paginate user setting is implemented. Fixes #193
2021-05-04 17:01:27 -05:00