38 Commits

Author SHA1 Message Date
Joseph Milazzo
d291eb809d
Series Detail Refactor (#1118)
* Fixed a bug where reading list and collection's summary wouldn't render newlines

* Moved all the logic in the UI for Series Detail into the backend (messy code). We are averaging 400ms max with much optimizations available. Next step is to refactor out of controller and provide unit tests.

* Unit tests for CleanSpecialTitle

* Laid out foundation for testing major code in SeriesController.

* Refactored code so that read doesn't need to be disabled on page load. SeriesId doesn't need the series to actually load.

* Removed old property from Volume

* Changed tagbadge font size to rem.

* Refactored some methods from SeriesController.cs into SeriesService.cs

* UpdateRating unit tested

* Wrote unit tests for SeriesDetail

* Worked up some code where books are rendered only as volumes. However, looks like I will need to use Chapters to better support series_index as floats.

* Refactored Series Detail to change Volume Name on Book libraries to have book name and series_index.

* Some cleanup on the code

* DeleteMultipleSeries test is hard. Going to skip.

* Removed some debug code and make all tabs Books for Book library Type
2022-02-24 12:23:40 -08:00
Joseph Milazzo
eddbb7ab18
Event Widget Update (#1098)
* Took care of some notes in the code

* Fixed an issue where Extra might get flagged as special too early, if in a word like Extraordinary

* Moved Tag cleanup code into Scanner service. Added a SplitQuery to another heavy API. Refactored Scan loop to remove parallelism and use async instead.

* Lots of rework on the codebase to support detailed messages and easier management of message sending. Need to take a break on this work.

* Progress is being made, but slowly. Code is broken in this commit.

* Progress is being made, but slowly. Code is broken in this commit.

* Fixed merge issue

* Fixed unit tests

* CoverUpdate is now hooked into new ProgressEvent structure

* Refactored code to remove custom observables and have everything use standard messages$

* Refactored a ton of instances to NotificationProgressEvent style and tons of the UI to respect that too. UI is still a bit buggy, but wholistically the work is done.

* Working much better. Sometimes events come in too fast. Currently cover update progress doesn't display on UI

* Fixed unit tests

* Removed SignalREvent to minimize internal event types. Updated the UI to use progress bars. Finished SiteThemeService.

* Merged metadata refresh progress events and changed library scan events to merge cleaner in the UI

* Changed RefreshMetadataProgress to CoverUpdateProgress to reflect the event better.

* Theme Cleanup (#1089)

* Fixed e-ink theme not properly applying correctly

* Fixed some seed changes. Changed card checkboxes to use our themed ones

* Fixed recently added carousel not going to recently-added page

* Fixed an issue where no results found would show when searching for a library name

* Cleaned up list a bit, typeahead dropdown still needs work

* Added a TODO to streamline series-card component

* Removed ng-lazyload-image module since we don't use it. We use lazysizes

* Darken card on hover

* Fixing accordion focus style

* ux pass updates

- Fixed typeahead width
- Fixed changelog download buttons
- Fixed a select
- Fixed various input box-shadows
- Fixed all anchors to only have underline on hover
- Added navtab hover and active effects

* more ux pass

- Fixed spacing on theme cards
- Fixed some light theme issues
- Exposed text-muted-color for theme card subtitle color

* UX pass fixes

- Changed back to bright green for primary on dark theme
- Changed fa icon to black on e-ink

* Merged changelog component

* Fixed anchor buttons text decoration

* Changed nav tabs to have a background color instead of open active state

* When user is not authenticated, make sure we set default theme (dark)

* Cleanup on carousel

* Updated Users tab to use small buttons with icons to align with Library tab

* Cleaned up brand to not underline, removed default link underline on hover in dropdown and pill tabs

* Fixed collection detail posters not rendering

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Tweaked some of the emitting code

* Some css, but pretty bad. Robbie please save me

* Removed a todo

* styling update

* Only send filename on FileScanProgress

* Some console.log spam cleanup

* Various updates

* Show events widget activity based on activeEvents

* progress bar color updates

* Code cleanup

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
2022-02-18 18:57:37 -08:00
Joseph Milazzo
568ea9fd3a
Custom Theme Support (#1077)
* Started the migration to bootstrap 5. Introduced a breakpoint system that bootstrap reflects for our screens.

* sr only migrated

* mr/ml -> me/ms

* pl/pr -> ps/pe

* btn-block

* removed input-group-append

* Added form-label to all labels

* Added some style overrides for inputs

* Replaced form-group with mb-3

* Ignore journal files

* Update media to d-flex/flex-grow-1

* Fixed reading list detail page

* For develop builds, don't inline critical styles

* Fixed some downstream security issues

* Fixed a layout issue in series detail

* Fixed issue with btn-light not having background color. Updated layout for series detail metadata

* Cleaned up nav search

* Laid out the organization for custom theme components. Update _inputs.scss with variable overrides and depending on theme, it will just work.

* Lots of theming work

* Added inputs to the theme page

* Login and input placeholder changes

- Fixed login screen centering issue on all devices
- Changed the format of the login screen
- Change the input placeholder color

* Added checkbox styles

* Refactored tagbadges and removed some ngdeep selectors

* Added nav bar component and refactored some styles into event widget

* Cleaned nav events again and made dedicated popover body

* Finished pagination component

* Fixed up some styles with buttons

* refactored dropdown component

* Update accordion component

* Refactored breadcrumbs and rating star. Fixed a missing style for cards

* Fixed some styling issues on person badge, added modal component, and some global styles

* Finished moving everything within dark to component files

* Fixed up filter buttons, move card styles into a component theme, fixed slider style

* Refactored library card and grouped typeahead

* Updated normal typeahead component and reduced amount of ngdeep selector

* Refactored grid breakpoints to be available by css variable, but it's hardcoded into the app

* Ensure breakpoints are defined per theme

* Fixed up some styling overrides and customization for nav links and alt button

* Removed some deep styles, moved css out of splash container and brough back labels for login page

* Finished css variable refactor

* Refactored all the theme variable definitions into files for each theme.

* Added back bootstrap overrides

* Added a note about bootstrap theme colors being not-possible to swap out at runtime

* Cleaned up some dead code

* Implemented the ability to set a custom theme on the site. Cleaned up misc code throughout.

* Additional changes

- Fixed nav where "kavita" was not hiding correctly on small viewports
- Fixed search bar to make the behavior more consistent
- Fixed accordion buttons
- Changed accordion buttons to be more responsive
- Added radio button colors
- Fixed radios on theme test page
- Changed login and reset password card layouts to be more consistent.
- Added primary color shade for when darker shading is needed.

* Built a basic site, allow the user to apply different themes, refactored nav service code out.

* Implemented the ability update a user's theme

* Added unit tests for Scan and Get Content in SiteThemeService.

* Fixed a bug in the login code and Pref code which wasn't joining on SiteTheme table. Wrote Unit tests and the UI component to manage current theme.

* Implemented scan so that it manages custom themes with unit tests

* Component updates

- Repositioning style ordering
- Adding indicator override
- Adding select styles

* SignlaR integration, some fixes when creating custom entities, one single migration. Just login functionality left.

* More ui updated

- Added .no-hover to prevent hover on elements where not needed
- Changed all selects I could find to appropriate class
- Changed up nav tabs to work more like bootstrap tabs than pills
- Added padding to top of some containers to make styles consistent
- Added ability to change navbar fontawesome icon colors
- removed some unecessary inline styling
- Changed radio button to appropriate class
- Toned down primate color, a bit too bright for dark theme.
- Added ability to change button fontawesome icon color

* nav-tab fix for series-detail

* Added themes folder to gitignore

* Adding card overlay

* Fixing up light theme

* Everything is done. Only bug is that color-scheme isn't being set properly from css variable.

* Checkboxes have pointer by default. Confirm/Confirm email use default (dark) theme by default

* Fixed an error where color-scheme wasn't reflecting correctly on themes on first load

* Fixed user preferences not available on login

* Changing dual radios to switches and color tweaks

* disabled primary APCA fix

* button APCA fixes

* Fixed some timing issues with first load and image service

* Fixed swiper issues from upgrade

* Changed themes to be scss files again and adjusted Seed code

* Migrated carousel to css variables. Fixed a broken animation for search.

* Cleaned up some backend smells

* Fixed white border outline on nav tabs, added some variables for header

* Nav bar has been css variable-ified

* Added some basic eink stuff to make the app useable

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
2022-02-16 07:12:38 -08:00
Joseph Milazzo
05c35a1cb6
Bookmark Refactor (#1049)
* Tweaked how the migration to change users with ChangePassword role happens. It will now only run once.

* Refactored bookmarks into it's own service with unit tests. Bookmark management happens in real time and we no longer delete bookmarks on a schedule. This means once you bookmark something, even if you delete the entity, the files will remain.

* Commented out a test that no longer is needed
2022-02-08 13:43:24 -08:00
Joseph Milazzo
2ae9f8c203
Private Email Service Support (#1028)
* Added ServerSettingKey's for SMTP and moved email service code to Kavita. Nothing integrated in the UI yet.

* Undo all the custom SMTP stuff and prepare for custom email service url.

* Foundation for email service to use a custom url is setup.

* Implemented the ability to hook up custom email url
2022-02-04 09:54:54 -08:00
Joseph Milazzo
efb527035d
Account Email Support (#1000)
* Moved the Server Settings out into a button on nav header

* Refactored Mange Users page to the new design (skeleton). Implemented skeleton code for Invite User.

* Hashed out more of the code, but need to move all the email code to a Kavita controlled API server due to password credentials.

* Cleaned up some warnings

* When no user exists for an api key in Plugin controller, throw 401.

* Hooked in the ability to check if the Kavita instance can be accessed externally so we can determine if the user can invite or not.

* Hooked up some logic if the user's server isn't accessible, then default to old flow

* Basic flow is working for confirm email. Needs validation, error handling, etc.

* Refactored Password validation to account service

* Cleaned up the code in confirm-email to work much better.

* Refactored the login page to have a container functionality, so we can reuse the styles on multiple pages (registration pages). Hooked up the code for confirm email.

* Messy code, but making progress. Refactored Register to be used only for first time user registration. Added a new register component to handle first time flow only.

* Invite works much better, still needs a bit of work for non-accessible server setup. Started work on underlying manage users page to meet new design.

* Changed (you) to a star to indicate who you're logged in as.

* Inviting a user is now working and tested fully.

* Removed the register member component as we now have invite and confirm components.

* Editing a user is now working. Username change and Role/Library access from within one screen. Email changing is on hold.

* Cleaned up code for edit user and disabled email field for now.

* Cleaned up the code to indicate changing a user's email is not possible.

* Implemented a migration for existing accounts so they can validate their emails and still login.

* Change url for email server

* Implemented the ability to resend an email confirmation code (or regenerate for non accessible servers). Fixed an overflow on the confirm dialog.

* Took care of some code cleanup

* Removed 3 db calls from cover refresh and some misc cleanup

* Fixed a broken test
2022-01-30 14:45:57 -08:00
Joseph Milazzo
12889be788
Fixes v0.4.19! (#855)
* Fixed OPDS urls to work with new Filtering schema

* Fixed a rendering issue with Language tag when it's null

* Fixed a bug where locked covers were resetting during refresh metadata.

* Redid all the migrations and put some extra checks due to a bad migration from previous release (EF Core was producing an error).

* Fixed a bug which didn't take sort direction when not changing sort field

* Default installs now backup daily
2021-12-17 10:46:01 -08:00
Joseph Milazzo
bbe8f800f6
.NET 6 Coding Patterns + Unit Tests (#823)
* Refactored all files to have Interfaces within the same file. Started moving over to file-scoped namespaces.

* Refactored common methods for getting underlying file's cover, pages, and extracting into 1 interface.

* More refactoring around removing dependence on explicit filetype testing for getting information.

* Code is buildable, tests are broken. Huge refactor (not completed) which makes most of DirectoryService testable with a mock filesystem (and thus the services that utilize it).

* Finished porting DirectoryService to use mocked filesystem implementation.

* Added a null check

* Added a null check

* Finished all unit tests for DirectoryService.

* Some misc cleanup on the code

* Fixed up some bugs from refactoring scan loop.

* Implemented CleanupService testing and refactored more of DirectoryService to be non-static.

Fixed a bug where cover file cleanup wasn't properly finding files due to a regex bug.

* Fixed an issue in CleanupBackup() where we weren't properly selecting database files older than 30 days. Finished CleanupService Tests.

* Refactored Flatten and RemoveNonImages to directory service to allow CacheService to be testable.

* Finally have CacheService tested. Rewrote GetCachedPagePath() to be much more straightforward & performant.

* Updated DefaultParserTests.cs to contain all existing tests and follow new test layout format.

* All tests fixed up
2021-12-05 08:58:53 -08:00
Joseph Milazzo
e7619e6b0a
Local Metadata Integration Part 1 (#817)
* Started with some basic plumbing with comic info parsing updating Series/Volume.

* We can now get chapter title from comicInfo.xml

* Hooked in the ability to store people into the chapter metadata.

* Removed no longer used imports, fixed up some foreign key constraints on deleting series with person linked.

* Refactored Summary out of the UI for Series into SeriesMetadata. Updated application to .net 6. There is a bug in metadata code for updating.

* Removed the parallel.ForEach with a normal foreach which lets us use async. For I/O heavy code, shouldn't change much.

* Refactored scan code to only check extensions with comic info, fixed a bug on scan events not using correct method name, removed summary field (still buggy)

* Fixed a bug where on cancelling a metadata request in modal, underlying button would get stuck in a disabled state.

* Changed how metadata selects the first volume to read summary info from. It will now select the first non-special volume rather than Volume 1.

* More debugging and found more bugs to fix

* Redid all the migrations as one single one. Fixed a bug with GetChapterInfo returning null when ChapterMetadata didn't exist for that Chapter.

Fixed an issue with mapper failing on GetChapterMetadata. Started work on adding people and a design for people.

* Fixed a bug where checking if file modified now takes into account if file has been processed at least once. Introduced a bug in saving people to series.

* Just made code compilable again

* Fixed up code. Now people for series and chapters add correctly without any db issues.

* Things are working, but I'm not happy with how the management of Person is. I need to take into account that 1 person needs to map to an image and role is arbitrary.

* Started adding UI code to showcase chapter metadata

* Updated workflow to be .NET 6

* WIP of updating card detail to show the information more clearly and without so many if statements

* Removed ChatperMetadata and store on the Chapter itself. Much easier to use and less joins.

* Implemented Genre on SeriesMetadata level

* Genres and People are now removed from Series level if they are no longer on comicInfo

* PeopleHelper is done with unit tests. Everything is working.

* Unit tests in place for Genre Helper

* Starting on CacheHelper

* Finished tests for ShouldUpdateCoverImage. Fixed and added tests in ArchiveService/ScannerService.

* CacheHelper is fully tested

* Some DI cleanup

* Scanner Service now calls GetComicInfo for books. Added ability to update Series Sort name from metadata files (mainly epub as comicinfo doesn't have a field)

* Forgot to move a line of code

* SortName now populates from metadata (epub only, ComicInfo has no tags)

* Cards now show the chapter title name if it's set on hover, else will default back to title.

* Fixed a major issue with how MangaFiles were being updated with LastModified, which messed up our logic for avoiding refreshes.

* Woohoo, more tests and some refactors to be able to test more services wtih mock filesystem. Fixed an issue where SortName was getting set as first chapter, but the Series was in a group.

* Refactored the MangaFile creation code into the DbFactory where we also setup the first LastModified update.

* Has file changed bug is now finally fixed

* Remove dead genres, refactor genre to use title instead of name.

* Refactored out a directory from ShouldUpdateCoverImage() to keep the code clean

* Unit tests for ComicInfo on BookService.

* Refactored series detail into it's own component

* Series-detail now received refresh metadata events to refresh what's on screen

* Removed references to Artist on PersonRole as it has no metadata mapping

* Security audit

* Fixed a benchmark

* Updated JWT Token generator to use new methods in .NET 6

* Updated all the docker and build commands to use net6.0

* Commented out sonar scan since it's not setup for net6.0 yet.
2021-12-02 09:02:34 -08:00
Joseph Milazzo
d750ce77a0
Shakeout Bugs (#623)
* Fixed an issue where ScanSeries would not fetch all the entities and thus files would get duplicated on the Chapter

* Remove building extra language binaries on build.

* Fixed an issue where first scan would cause an issue with websocket due to trying to send NaN over the wire.

* Fixed an issue where on new scans scan in progress indicators wouldn't turn off due to the way we were consuming events off the pipe.

* Ensure login page doesn't flash on first load

* Don't process touch events at all unless selection is enabled.
2021-10-03 05:27:35 -07:00
Joseph Milazzo
a5b6bf1b52
Disable Authentication & Login Page Rework (#619)
* Implemented the ability to disable authentication on a server instance. Admins will require authentication, but non-admin accounts can be setup without any password requirements.

* WIP for new login page.

* Reworked code to handle disabled auth better. First time user flow is moved into the user login component.

* Removed debug code

* Removed home component, shakeout testing is complete.

* remove a file accidently committed

* Fixed a code smell from last PR

* Code smells
2021-10-02 11:23:58 -05:00
Joseph Milazzo
6069d93c38
OPDS Support (#526)
* Added some basic OPDS implementation

* Fixed an issue with feed href

* More changes

* Added library routes and moved user code to a method so we can hack in fixed code without authentication

* Images now load on the OPDS reusing our existing Image infrastructure.

* Added the ability to download and moved some download code to a dedicated service

* Download is working, pagination is implemented.

* Refactored libraries to use pagination

* Laid foundation for OpenSearch implementation

* Fixed up some serialization issues and some old code that wasn't referencing helper methods

* Ensure chapters are sorted when we send them over OPDS

* OpenSearch implemented

* Removed any support for OPDS-PS due to lack of apps supporting it.

* Don't distribute development.json nor stats directory on build.

* Implemented In Progress feed as well.

* Ability to enable OPDS for server. OPDS now accepts initial call as POST in case app uses username/password.

* UI now properly renders state for OPDS enablement. Added Collections routes.

* Fixed pagination startIndex on OPDS feeds when there is less than 1 page.

* Chunky Reader now works. It only accepts UTF-8 encodings

* More Chunky fixes

* More chunky changes, such a fussy client.

* Implemented the ability to have a custom api key assigned to a user and use that api key as your authentication token against OPDS routing.

* Implemented the ability to reset your API Key

* Fixed favicon not being sent back correctly

* Fixed an issue where images wouldn't send on OPDS feed.

* Implemented Page streaming and fixed a pagination bug

* Hooked in the ability to save progress in Kavita when Page Streaming
2021-08-27 10:19:25 -07:00
Joseph Milazzo
2809233de0
Update Notifier (#464)
# Added
- Added: Ability to check for updates (stable-only) and be notified with a changelog. This is a first pass implementation. 
- Added: Ability to use SignalR within Kavita (websockets)
=====================================

* (some debug code present). Implemented the ability to check and log if the server is up to date or not.

* Fixed a bug for dark mode where anchor buttons wouldn't have the correct font color.

Suppress filter/sort button if there is no filters to show.

Debug: Active indicators for users currently on your server.

Refactored code to send update notification only to admins. Admins now get a popup where they can open the Github release (docker users can just close).

* Fixed an issue where getLibraryNames on first load would call for as many cards there was on the screen. Now we call it much earlier and the data is cached faster.

* Fixed a dark mode bug from previous commit

* Release notes is now rendered markdown

* Implemented the ability to check for an update ad-hoc. Response will come via websocket to all admins.

* Fixed a missing padding

* Cleanup, added some temp code to carousel

* Cleaned up old stat stuff from dev config and added debug only flow for checking for update

* Misc cleanup

* Added readonly to one variable

* Fixed In Progress not showing for all series due to pagination bug

* Fixed the In progress API returning back series that had another users progress on them. Added SplitQuery which speeds up query significantly.

* SplitQuery in GetRecentlyAdded for a speed increase on API.

Fixed the logic on VersionUpdaterService to properly send on non-dev systems.

Disable the check button once it's triggered once since the API does a task, so it can't return anything.

* Cleaned up the admin actions to be more friendly on mobile.

* Cleaned up the message as we wait for SingalR to notify the user

* more textual changes

* Code smells
2021-08-09 08:52:24 -05:00
Joseph Milazzo
b8165b311c
Misc Polishing (#413)
* Ensure that after we assign a role to a user, we show it immediately

* Cached libraryType api as that is not going to change in a viewing session. Moved some components around to tighten bundles.

* Cleaned up more TODOs
* Refactored Configuration to use getter and setters so that the interface is a lot cleaner. Updated HashUtil to use JWT Secret instead of Machine name (as docker machine name is random each boot).
2021-07-20 21:39:44 -05:00
Joseph Milazzo
2a34fe4cc7
The big one (#396)
* Refactored library card to have a custom implemenation using icons rather than images. In addition, swapped out font awesome with official version.

* Replaced pull-right with float-right due to updated bootstrap version.

* Added a new section to admin dashboard

* Added some menu system for reader, fit to width, height or original. Temp hack to make background black.

* Ability to set nav bar completely off from some pages. Removed test case that isn't used.

* Restore nav bar after reading

* Implemented ability to delete a series directly and scan from a series.

* Implemented some basic prefetching capabilities (just next page) and implemented proper reading direction support with a toggle.

* Added a no connection route for if backend goes down. Removed go to page functionality as it isn't really needed and overly complicated.

* Implemented ability to track progress and view it at a series level

* Read status enhancements, cleaned up card code a bit, styling changes on nav bar dropdown, read or continue functionality for series detail page.

* Fixed a few bugs around registering and refactored APIs to match backend.

* Lots of cleanup of the code and TODOs. Improved responsiveness on series detail page.

* Missed some changes

* Implemented ability to rate a series. review text will come in v0.2.

* Reverted some debug code for reader menu always being open. Added loader to reader as well.

* Setup for building prod for releasing Kavita server.

* After we create an admin for first time flow, refresh page so they can login.

* Small change to help user get to server settings to setup libraries

* Implemented ability to save what tab you are on or link directly to tab for admin dashboard.

* Implemented ability to reset another users password. Tweaked how error interceptor reacted to OK messages.

* Implemented general settings. Have ability to change cache directory, but disabled on BE.

* Remove SSL

* Implemented Volume 0's for series detail.

* Compressed image-placeholder and implemented refresh metadata. Refresh metadata will update cover images while scan library will just fix matching, etc.

* Refactored for backened architectural changes. Fixed some bugs around read progress off by one.

* Fixed some styling around grid layout for volume then chapters.

* On unauthorized, force logout then redirect to login page.

* Don't throw multiple toasters when somthing goes wrong due to backend going down.

* Implemented the ability to see and update server settings.

* Implemented user preferences and ability to update them. Fixed a bug in production code such that API requests are made on current domain.

* Small fixes around the app and server setting for port.

* Fixed some styling to look better on mobile devices and overflow text to eclipse.

* Cleanup and implemented card details for Volume/Chapters.

* Small tweak to card details

* Mark as Read/unread on Volumes now implemented.

* Cleaned up some code, integrated user settings into manga reader, took care of some todos.

* Forgot to sort chapters

* Fixed issue in card details with string concatentation

* Updated the Manga Reader to be better looking and simplier (code) on Desktop devices.

* Added more responsive breakpoints for overlay to look much better on more screen sizes

* Some changes for tablet. Clear out localStorage that is older than 1 page of what you're reading.

* Fix bug for continuing where you last left off.

* Fixed a bug where continue reading didn't take into account chapters.

* Cleaned up imports and added autocomplete skeleton.

* Small UX enhancements

* Moved manga-reader into it's own module to lessen default package size

* Removed route guards from reader module as it is handled by parent module.

* Responsive pass through on Series Detail page.

* Cleaned up containers and tooltips.

* Tooltip for icon only buttons

* Library editor modal cleanup

* Implemented nav bar for directory picker.

* Removed console.log

* Implemented a basic search for Kavita. Along the way did some CSS changes and error interceptor messages are better.

* Implemented a re-usable base64 image that can be styled. Not as easy as using inline styling, but easy to use.

* View encapsulation off so we can easily size these images.

* Implemented typeahead search for nav bar.

* Fix a bug when route parameters change, the series detail page wasn't updating with new information

* Implemented page splitting

* Cleaned up Card Details and split into 2 separate versions with unified Look and Feel.

* Implemented ability to mark a series as read/unread.

* Implemented Jump to First/Last page functionality as shortcuts to goToPage.

* Implemented pagination on Library Detail page

* Restore scroll position to the top on page route change

* Not sure if this changes anything, but IDE doesn't complain

* Added a cutsom favicon and small tweak on UI for library pagination controls.

* Bugfix to take into account currently reading chapter for read/continue button

* Implemented user reviews

* Forgot to hook up one click handler

* Only admins can edit a series

* Implemented edit series page. Many fields are not yet supported for modification.

* Hooked in Edit Series into backend. Fixed an ngIf on edit review button.

* Switched over existing series info modal to use the new edit one.

* Partially implemented download logs. Removed some files not needed and trialing css changes on actions menu for card items.

* Integrated Jest for Unit Testing and added one test case. Will expand and integrate into work flow.

* Cleaned up some mobile breakpoint styles. Looks much better on a phone.

* A bit more css around phones to make reader menu useable.

* Removed series-card-detail since it's been replaced with edit-series-modal.

* Implemented save logs

* Small cleanup

* More responsive breakpoint tweaks for nav bar.

* Fetching logs is fixed

* Bugfix: Search bar was visible for non-authenticated users

* Implemented the ability to correct (manually) a series title and for it to persist between scans. Small QoL changes throughout codebase.

* Added some broken test setup.

* Disable comments must start with space lint rule.

* Fixed issue where tablets wouldn't be able to render all images.

* Migrated code off localStorage and used one api to get information about chapter.

* Cleaned up the code now that we are loading images differently.

* Use circular array to cache image requests so that we can ensure next image is instantaneously available.

* Some fixes around ensuring we don't prefetch when going back a page and ensuring prefetch doesn't fetch more pages than there are left.

* Fixed #70: When marking as read from volume level, completion was off by 1 thus series level didn't show as completed.

* Fixed #72. Missing an else statement which allowed another navigate to override the correct code. Refactored hasReadingProgress to be set in setContinuePoint

* Cleaned up the User button in nav bar to be cleaner

* Implemented a custom confirm/alert service so that I have complete control over style.

* Missed LGTM exception

* First pass at removing base64 strings for images and using lazy loaded binary file images.

* Only load images that are within view (scroll port)

* Not connected message needs more top margin

* Move image handling to it's own service. Add transition for loading images and some cleanup

* Misc cleanup

* Refactored action items to a factory

* Refactored the card item actionables into factory and moved actionable rendering into one component

* Added an optional btn class input to allow styling menu as a button.

* Implemented the ability to reset your individual password.

* Wrong reset after resetting password

* Don't let user set log level. Not sure it's possible to implement in ASP.NET

* Implemented a carousel for streams component. Still needs some CSS and tweaking. Added some temp API endpoints for streams. Fixed a bug where after editing name on series underlying card didn't reflect.

* Everything but the css is done

* CSS done. Carousel components implemented

* More CSS stuff

* Small css change

* Some cleanup on code

* Add  aria-hidden="true" on icons

* Fixed css issue due to missing class

* Made scrolling carousel feel better on more screen sizes

* Fixed bug where confirm default buttons would all be cancel.

* Replaced placeholder image with a kavita placeholder. Added a theme folder for standardizing colors. Cleaned up some css here and there.

* Removed a dependency no longer needed. Implemented history based pagination for library detail page.

* Changed MangaFile numberOfPages to Page to match with new migration

* Fixed issue where if no chapters, we were just doing console.error instead of informing the user (should never happen)

* Add a todo for a future feature

* Implemented loading on series-detail volume section and fixed an issue where the whole series is just one volume and it's a special aka we can't parse vol/chapter from it, so it renders appropriately

* Fixed a rare issue where split pages would quickly flash both sides due to previously that page being fetched via onload and thus when render called, render got recalled.

* Fixed an off by 1 issue due to the fact that reading is 0-based and everything else is 1 based. (#94)

* Fixed an off by 1 issue due to the fact that reading is 0-based and everything else is 1 based. (#94) (#95)

* Fixed an issue where special case that handles no volumes was showing also when chapters also existed. Renamed "Chapter 0" as "Specials" (#96)

* Bugfixes! (#99)

* Fixed an issue where special case that handles no volumes was showing also when chapters also existed. Renamed "Chapter 0" as "Specials"

* Fixed a typo resulting in pages not rendering on edit series modal. Ensure chapters are sorted on edit series and card details modal.

* Fixed the date format showing days before months.

* Fixed a bug with scrollable modals for context info modals.

* Fixed a bug where adding a folder to a library added a / before the path, thus breaking on linux. (#101)

* Bugfixes (#103)

* Fixed an issue where special case that handles no volumes was showing also when chapters also existed. Renamed "Chapter 0" as "Specials"

* Fixed a typo resulting in pages not rendering on edit series modal. Ensure chapters are sorted on edit series and card details modal.

* Fixed the date format showing days before months.

* Fixed a bug with scrollable modals for context info modals.

* Last modified on chapters didn't really s how well and made no sense to show, removed it.

* Preparing for feature

* CSS adjustment for admin dashboard

* First flow, ensure we go directly to library tab

* When a user registers for first time, put them on login instead of relying on home page redirection.

* Fixed an issue with directory picker where the path separators didn't work for both linux and windows systems.

* Implement comic support (#104)

* Implement comic support

* Any disabled controls should show not-allowed pointer.

* Fixed a scroll bug on modal

* On connection lost, restore to previous page (#106)

* Implement comic support

* Any disabled controls should show not-allowed pointer.

* Fixed a scroll bug on modal

* If the server goes down between sessions and we go to not-connected page, try to restore previous route when connection regained.

* Fixed an issue where context menus weren't resetting when an admin logs out and a new non-admin logs in. (#108)

* Error Cards (#110)

* Fixed an issue where context menus weren't resetting when an admin logs out and a new non-admin logs in.

* Implemented a marker to inform the user that some archives can't be parsed.

* Don't show scrollbar if we don't have enough height to overflow

* Shows an error card when the underlying archive could not be read at all.

* Changed the card up

* Special grouping (#115)

* Implemented splitting specials into their own section for individual reading. Requires up to date backend for db changes.

* Cleaned up the code

* Replace underscores on specials if they exist. A simple name cleaning.

* Lots of Fixes (#126)

* Fixed After editing a user's library access, the Sharing details aren't updating without a refresh #116

* Fixed Series Summary & Review do not respect newline characters #114

* Default to non-specials tab and don't destroy DOM between tab changes

* Align UI api with backend

* Library icon should be "manga" for comic and Manga

* Fixed Mark Series as Read in series detail page doesn't update the volume/chapter cards unless page is refreshed. #118

* Fixed Defect: 2 Split pages in a row causes second page to not split #112

* Fixed an issue if last page is a splitpage, we wouldn't be able to see the other side of the split.

* When jumping to begining and end and both first page and last page are splitpages, make sure we set the paging direction so user can view both pages.

* Make sure we take into account splits when we try jump to first page then try to go "back" to the other split.

* Cleaned up split code a bit

* Fixed Go to Page is off by one #124

* Fixed Read button is showing continue when a show doesn't have any progress on it #121

* Implemented Read more component (Fixes #117)

* Fixed a bug in gotopage where if you went to maxPages or greater, we would always - 1 from page number.

* Forgot to commit this for Readmore component

* tslint cleanup

* Implemented Refactor Review to be bound to the star control rather than having a text review so the user can review without rating. #125

* Fixes #119 - 0 Volumes with 0 chapters were showing as specials, but should be in the special tab.

* Fixed an issue from reverting scanSeries code.

* Handle specials with a little more care

* Fixed #138. Search wasn't showing localizedName due to a rendering issue.

* Fixed an issue where L2R didn't handle multiple split pages in a row.

* Code smells

* Ensure we wipe context actions for library between login/logouts

* Fixed loading series after marking searies unread/read (#135)

* Removed isSpecial from volume (#137)

* Bugfix/gotopage (#139)

* Fixed #138

* Fixed #131 - getStem no longer removes the substring if lastPath is same as path.

* Implements Issue #129 - There is now a close book button on the menu

* Book Support (#141)

* Refactored Library Type dropdown to use an API so UI/Backend is in sync.

* Implemented the ability to load the book reader

* Book support but none of this works. Just here to keep track as I switch to other bugs

* Basic iframe implementation is now working

* Needed changes to load the content into native div rather than via iframe.

* We now have the ability to customize how we render the text.

* Removed console.log

* Implemented the ability to loadpages from remapped anchors from backend.

* Removed epubjs references and implemented table of contents api.

* Code now works for chapters with nested chapters

* Lots of changes, most of the reader is half baked, but foundation is there.

* Changed styles up a bit

* Implemented the ability to scroll to a part within a book. Added a custom font to test out.

* Show active page with a bolding when there are nested chapters

* Chapter group titles are now clickable

* Added the ability to set top offset in drawer

* Finally got style overrides to work and some other stuff

* User can now toggle menu with space

* Ensure styles don't leak. Drawer bottom was cutoff. On phone devices, default margins should be 0%.

* Use smooth scrolling when navigating between pages with scroll offset

* Added some code for checking when all images on page are loaded, added a fade in animation (doesnt work) and some media queries for top bar.

* Refactored all data structures in application into shared module

* CSS changes

* Fixed part selector query due to improper ids, now we use a more robust query type. Implemented a stack for adhoc clicks, so user can explore a bit but pagination is based on current page.

* Reverted sidenav changes. Fixed scrollTo to be more reliable with how the content comes into view.

* When you make an adhoc link jump, we now restore page and scroll position.

* Hooked in basic preferences for books and force margin settings for mobile devices.

* Book overrides now work all the time. Added a bunch of fonts for users to try out.

* Added all font faces

* A bit hacky, but darkMode now works for the reader.

* Remove styles on destroy

* First time users will have their menu open automatically

* Book format now shows on card details modal

* changed how margin updates to make more sense

* Fixed flashing by applying an opacity transition on page change.

* Code cleanup

* Reverted changes to unify series-detail page. Added some extra accessibility for book reader.

* Implement the ability to close drawer by clicking into the reader area

* Don't let the user page past where they should be able to

* Allow user to see the underlying values of customizations and when they save them, actually reset to their preferences

* Responsive top for sticky header

* Code smells

* Implemented the ability to update book settings from user settings

* code smells

* Code smells and max/mins on reader should match the user pref area

* Feature/feats and fixes (#144)

* In case a migration is poorly implemented, default on first load of bookreader.

* If there is no table of contents in epub file, inform the user

* Fixed #143 by ensuring we properly flatten the correct property when catching errors.

* Fixed #140. Search bar in nav is now more responsive than ever and properly scales down to even the smallest phone sizes (less than 300px)

* For Cards, moved the action menu into the bottom area, added Library link that said series belongs to.

* Added library to the series detail card

* Implemented the ability to automatically scale the manga reader based on screen size.

* Fix code smells

* Feature/feats and fixes (#146)

* In case a migration is poorly implemented, default on first load of bookreader.

* If there is no table of contents in epub file, inform the user

* Fixed #143 by ensuring we properly flatten the correct property when catching errors.

* Fixed #140. Search bar in nav is now more responsive than ever and properly scales down to even the smallest phone sizes (less than 300px)

* For Cards, moved the action menu into the bottom area, added Library link that said series belongs to.

* Added library to the series detail card

* Implemented the ability to automatically scale the manga reader based on screen size.

* Fix code smells

* Use margin-top instead of top for offsetting top

* Add a little extra spacing just in case

* Updated carousel to use a swpier

* Increased the budget and changed how vendor module is created

* Added some todos

* Implemented the ability to suppress library link on cards

* Fixed an issue with top offset for reading section

* Added the action bar to the bottom when user scrolls all the way down (Feedback)

* Added in a skip to content link for top nav

* After performing an action on library page, refresh the data on page.

* Implemented the ability to refresh metadata of a single series directly

* Implemented a progress bar for reading and a go to page by clicking the progress bar

* Only show the bottom action bar when there is a scrollbar

* Implemented the ability to tap the sides of book reader to paginate

* Book Feedback and Fixes (#147)

* In case a migration is poorly implemented, default on first load of bookreader.

* If there is no table of contents in epub file, inform the user

* Fixed #143 by ensuring we properly flatten the correct property when catching errors.

* Fixed #140. Search bar in nav is now more responsive than ever and properly scales down to even the smallest phone sizes (less than 300px)

* For Cards, moved the action menu into the bottom area, added Library link that said series belongs to.

* Added library to the series detail card

* Implemented the ability to automatically scale the manga reader based on screen size.

* Fix code smells

* Use margin-top instead of top for offsetting top

* Add a little extra spacing just in case

* Updated carousel to use a swpier

* Increased the budget and changed how vendor module is created

* Added some todos

* Implemented the ability to suppress library link on cards

* Fixed an issue with top offset for reading section

* Added the action bar to the bottom when user scrolls all the way down (Feedback)

* Added in a skip to content link for top nav

* After performing an action on library page, refresh the data on page.

* Implemented the ability to refresh metadata of a single series directly

* Implemented a progress bar for reading and a go to page by clicking the progress bar

* Only show the bottom action bar when there is a scrollbar

* Implemented the ability to tap the sides of book reader to paginate

* Cleaned up carousel and fixed breakpoints so we always at least show 2 cards.

* Cleaned up menu for manga reader and changed how automatic scaling works, based on ratio of width to height rather than raw numbers.

* Fixed an issue where using left/right keys on book reader wouldn't behave like clicking left/right pagination buttons.

* Dark mode and click to paginate was conflicting. The hint overlay still doesn't work when dark mode is on.

* Book Feedback (#148)

* In case a migration is poorly implemented, default on first load of bookreader.

* If there is no table of contents in epub file, inform the user

* Fixed #143 by ensuring we properly flatten the correct property when catching errors.

* Fixed #140. Search bar in nav is now more responsive than ever and properly scales down to even the smallest phone sizes (less than 300px)

* For Cards, moved the action menu into the bottom area, added Library link that said series belongs to.

* Added library to the series detail card

* Implemented the ability to automatically scale the manga reader based on screen size.

* Fix code smells

* Use margin-top instead of top for offsetting top

* Add a little extra spacing just in case

* Updated carousel to use a swpier

* Increased the budget and changed how vendor module is created

* Added some todos

* Implemented the ability to suppress library link on cards

* Fixed an issue with top offset for reading section

* Added the action bar to the bottom when user scrolls all the way down (Feedback)

* Added in a skip to content link for top nav

* After performing an action on library page, refresh the data on page.

* Implemented the ability to refresh metadata of a single series directly

* Implemented a progress bar for reading and a go to page by clicking the progress bar

* Only show the bottom action bar when there is a scrollbar

* Implemented the ability to tap the sides of book reader to paginate

* Cleaned up carousel and fixed breakpoints so we always at least show 2 cards.

* Cleaned up menu for manga reader and changed how automatic scaling works, based on ratio of width to height rather than raw numbers.

* Fixed an issue where using left/right keys on book reader wouldn't behave like clicking left/right pagination buttons.

* Dark mode and click to paginate was conflicting. The hint overlay still doesn't work when dark mode is on.

* Fixed issue where errors from login flow would not throw a toastr

* Moved the progress bar and go to page into the side drawer to be less distracting when reading

* Removed console.logs

* Cleaned up styles on slider to be closer to size of cards

* Fixed an issue with swiper not allowing use of touch (#149)

* Fixed in progress by on last page incrementing to maxPages itself, thus ensuring it matches the sum of pages. (#151)

* Bugfix/in progress (#156)

* Fixed in progress by on last page incrementing to maxPages itself, thus ensuring it matches the sum of pages.

* Actually fix in progress by only incrementing page num on bookmark when we are on the last page

* Impleents tap to paginate user setting. (#157)

* Feature/manga reader (#160)

* Implemented pressing G to open go to page. Enhanced the dialog to give how many pages you can go to. On page splitting button press, if the current page needs splitting, we will re-render with the new option.

* Added gotopage shortcut key for book reader

* Setup for new feature

* Swiper now respects card sizes

* Fixes #51 and updates dependencies for security vulnerabilities

* Implemented back to top button

* Remove the - 1 hack from series-detail

* Remove hack from carad item

* Fix a regression where book reader would +1 pageNum for bookmarking on last page, but because books don't start at 0 for page nums, it isn't necessariy

* Implemented the ability to move between volumes automatically

* Additional security fix

* Code smells

* Cleaned up the implementation to properly prevent pagination when loading next chapter/volume

* v0.4 Last touches (#162)

* PurgeCSS integration

* Changed some icons to have titles

* Automatic scaling changes

* Removed 2 font families that didn't make the release cut. Fixed an off by 1 regression with setContinuePoint

* Backed out purge css after testing

* Some cleanup of the package

* Automatic scaling adjustments

* Bugfix/release shakeout (#164)

* Fixed body color not being reset due to capturing it too late

* Removed some dead code

* v0.4 merge to stable (#165)

* Fixed an off by 1 issue due to the fact that reading is 0-based and everything else is 1 based. (#94)

* Fixed an issue where special case that handles no volumes was showing also when chapters also existed. Renamed "Chapter 0" as "Specials" (#96)

* Bugfixes! (#99)

* Fixed an issue where special case that handles no volumes was showing also when chapters also existed. Renamed "Chapter 0" as "Specials"

* Fixed a typo resulting in pages not rendering on edit series modal. Ensure chapters are sorted on edit series and card details modal.

* Fixed the date format showing days before months.

* Fixed a bug with scrollable modals for context info modals.

* Fixed a bug where adding a folder to a library added a / before the path, thus breaking on linux. (#101)

* Bugfixes (#103)

* Fixed an issue where special case that handles no volumes was showing also when chapters also existed. Renamed "Chapter 0" as "Specials"

* Fixed a typo resulting in pages not rendering on edit series modal. Ensure chapters are sorted on edit series and card details modal.

* Fixed the date format showing days before months.

* Fixed a bug with scrollable modals for context info modals.

* Last modified on chapters didn't really s how well and made no sense to show, removed it.

* Preparing for feature

* CSS adjustment for admin dashboard

* First flow, ensure we go directly to library tab

* When a user registers for first time, put them on login instead of relying on home page redirection.

* Fixed an issue with directory picker where the path separators didn't work for both linux and windows systems.

* Implement comic support (#104)

* Implement comic support

* Any disabled controls should show not-allowed pointer.

* Fixed a scroll bug on modal

* On connection lost, restore to previous page (#106)

* Implement comic support

* Any disabled controls should show not-allowed pointer.

* Fixed a scroll bug on modal

* If the server goes down between sessions and we go to not-connected page, try to restore previous route when connection regained.

* Fixed an issue where context menus weren't resetting when an admin logs out and a new non-admin logs in. (#108)

* Error Cards (#110)

* Fixed an issue where context menus weren't resetting when an admin logs out and a new non-admin logs in.

* Implemented a marker to inform the user that some archives can't be parsed.

* Don't show scrollbar if we don't have enough height to overflow

* Shows an error card when the underlying archive could not be read at all.

* Changed the card up

* Special grouping (#115)

* Implemented splitting specials into their own section for individual reading. Requires up to date backend for db changes.

* Cleaned up the code

* Replace underscores on specials if they exist. A simple name cleaning.

* Lots of Fixes (#126)

* Fixed After editing a user's library access, the Sharing details aren't updating without a refresh #116

* Fixed Series Summary & Review do not respect newline characters #114

* Default to non-specials tab and don't destroy DOM between tab changes

* Align UI api with backend

* Library icon should be "manga" for comic and Manga

* Fixed Mark Series as Read in series detail page doesn't update the volume/chapter cards unless page is refreshed. #118

* Fixed Defect: 2 Split pages in a row causes second page to not split #112

* Fixed an issue if last page is a splitpage, we wouldn't be able to see the other side of the split.

* When jumping to begining and end and both first page and last page are splitpages, make sure we set the paging direction so user can view both pages.

* Make sure we take into account splits when we try jump to first page then try to go "back" to the other split.

* Cleaned up split code a bit

* Fixed Go to Page is off by one #124

* Fixed Read button is showing continue when a show doesn't have any progress on it #121

* Implemented Read more component (Fixes #117)

* Fixed a bug in gotopage where if you went to maxPages or greater, we would always - 1 from page number.

* Forgot to commit this for Readmore component

* tslint cleanup

* Implemented Refactor Review to be bound to the star control rather than having a text review so the user can review without rating. #125

* Fixes #119 - 0 Volumes with 0 chapters were showing as specials, but should be in the special tab.

* Fixed an issue from reverting scanSeries code.

* Handle specials with a little more care

* Fixed #138. Search wasn't showing localizedName due to a rendering issue.

* Fixed an issue where L2R didn't handle multiple split pages in a row.

* Code smells

* Ensure we wipe context actions for library between login/logouts

* Fixed loading series after marking searies unread/read (#135)

* Removed isSpecial from volume (#137)

* Bugfix/gotopage (#139)

* Fixed #138

* Fixed #131 - getStem no longer removes the substring if lastPath is same as path.

* Implements Issue #129 - There is now a close book button on the menu

* Book Support (#141)

* Refactored Library Type dropdown to use an API so UI/Backend is in sync.

* Implemented the ability to load the book reader

* Book support but none of this works. Just here to keep track as I switch to other bugs

* Basic iframe implementation is now working

* Needed changes to load the content into native div rather than via iframe.

* We now have the ability to customize how we render the text.

* Removed console.log

* Implemented the ability to loadpages from remapped anchors from backend.

* Removed epubjs references and implemented table of contents api.

* Code now works for chapters with nested chapters

* Lots of changes, most of the reader is half baked, but foundation is there.

* Changed styles up a bit

* Implemented the ability to scroll to a part within a book. Added a custom font to test out.

* Show active page with a bolding when there are nested chapters

* Chapter group titles are now clickable

* Added the ability to set top offset in drawer

* Finally got style overrides to work and some other stuff

* User can now toggle menu with space

* Ensure styles don't leak. Drawer bottom was cutoff. On phone devices, default margins should be 0%.

* Use smooth scrolling when navigating between pages with scroll offset

* Added some code for checking when all images on page are loaded, added a fade in animation (doesnt work) and some media queries for top bar.

* Refactored all data structures in application into shared module

* CSS changes

* Fixed part selector query due to improper ids, now we use a more robust query type. Implemented a stack for adhoc clicks, so user can explore a bit but pagination is based on current page.

* Reverted sidenav changes. Fixed scrollTo to be more reliable with how the content comes into view.

* When you make an adhoc link jump, we now restore page and scroll position.

* Hooked in basic preferences for books and force margin settings for mobile devices.

* Book overrides now work all the time. Added a bunch of fonts for users to try out.

* Added all font faces

* A bit hacky, but darkMode now works for the reader.

* Remove styles on destroy

* First time users will have their menu open automatically

* Book format now shows on card details modal

* changed how margin updates to make more sense

* Fixed flashing by applying an opacity transition on page change.

* Code cleanup

* Reverted changes to unify series-detail page. Added some extra accessibility for book reader.

* Implement the ability to close drawer by clicking into the reader area

* Don't let the user page past where they should be able to

* Allow user to see the underlying values of customizations and when they save them, actually reset to their preferences

* Responsive top for sticky header

* Code smells

* Implemented the ability to update book settings from user settings

* code smells

* Code smells and max/mins on reader should match the user pref area

* Feature/feats and fixes (#144)

* In case a migration is poorly implemented, default on first load of bookreader.

* If there is no table of contents in epub file, inform the user

* Fixed #143 by ensuring we properly flatten the correct property when catching errors.

* Fixed #140. Search bar in nav is now more responsive than ever and properly scales down to even the smallest phone sizes (less than 300px)

* For Cards, moved the action menu into the bottom area, added Library link that said series belongs to.

* Added library to the series detail card

* Implemented the ability to automatically scale the manga reader based on screen size.

* Fix code smells

* Feature/feats and fixes (#146)

* In case a migration is poorly implemented, default on first load of bookreader.

* If there is no table of contents in epub file, inform the user

* Fixed #143 by ensuring we properly flatten the correct property when catching errors.

* Fixed #140. Search bar in nav is now more responsive than ever and properly scales down to even the smallest phone sizes (less than 300px)

* For Cards, moved the action menu into the bottom area, added Library link that said series belongs to.

* Added library to the series detail card

* Implemented the ability to automatically scale the manga reader based on screen size.

* Fix code smells

* Use margin-top instead of top for offsetting top

* Add a little extra spacing just in case

* Updated carousel to use a swpier

* Increased the budget and changed how vendor module is created

* Added some todos

* Implemented the ability to suppress library link on cards

* Fixed an issue with top offset for reading section

* Added the action bar to the bottom when user scrolls all the way down (Feedback)

* Added in a skip to content link for top nav

* After performing an action on library page, refresh the data on page.

* Implemented the ability to refresh metadata of a single series directly

* Implemented a progress bar for reading and a go to page by clicking the progress bar

* Only show the bottom action bar when there is a scrollbar

* Implemented the ability to tap the sides of book reader to paginate

* Book Feedback and Fixes (#147)

* In case a migration is poorly implemented, default on first load of bookreader.

* If there is no table of contents in epub file, inform the user

* Fixed #143 by ensuring we properly flatten the correct property when catching errors.

* Fixed #140. Search bar in nav is now more responsive than ever and properly scales down to even the smallest phone sizes (less than 300px)

* For Cards, moved the action menu into the bottom area, added Library link that said series belongs to.

* Added library to the series detail card

* Implemented the ability to automatically scale the manga reader based on screen size.

* Fix code smells

* Use margin-top instead of top for offsetting top

* Add a little extra spacing just in case

* Updated carousel to use a swpier

* Increased the budget and changed how vendor module is created

* Added some todos

* Implemented the ability to suppress library link on cards

* Fixed an issue with top offset for reading section

* Added the action bar to the bottom when user scrolls all the way down (Feedback)

* Added in a skip to content link for top nav

* After performing an action on library page, refresh the data on page.

* Implemented the ability to refresh metadata of a single series directly

* Implemented a progress bar for reading and a go to page by clicking the progress bar

* Only show the bottom action bar when there is a scrollbar

* Implemented the ability to tap the sides of book reader to paginate

* Cleaned up carousel and fixed breakpoints so we always at least show 2 cards.

* Cleaned up menu for manga reader and changed how automatic scaling works, based on ratio of width to height rather than raw numbers.

* Fixed an issue where using left/right keys on book reader wouldn't behave like clicking left/right pagination buttons.

* Dark mode and click to paginate was conflicting. The hint overlay still doesn't work when dark mode is on.

* Book Feedback (#148)

* In case a migration is poorly implemented, default on first load of bookreader.

* If there is no table of contents in epub file, inform the user

* Fixed #143 by ensuring we properly flatten the correct property when catching errors.

* Fixed #140. Search bar in nav is now more responsive than ever and properly scales down to even the smallest phone sizes (less than 300px)

* For Cards, moved the action menu into the bottom area, added Library link that said series belongs to.

* Added library to the series detail card

* Implemented the ability to automatically scale the manga reader based on screen size.

* Fix code smells

* Use margin-top instead of top for offsetting top

* Add a little extra spacing just in case

* Updated carousel to use a swpier

* Increased the budget and changed how vendor module is created

* Added some todos

* Implemented the ability to suppress library link on cards

* Fixed an issue with top offset for reading section

* Added the action bar to the bottom when user scrolls all the way down (Feedback)

* Added in a skip to content link for top nav

* After performing an action on library page, refresh the data on page.

* Implemented the ability to refresh metadata of a single series directly

* Implemented a progress bar for reading and a go to page by clicking the progress bar

* Only show the bottom action bar when there is a scrollbar

* Implemented the ability to tap the sides of book reader to paginate

* Cleaned up carousel and fixed breakpoints so we always at least show 2 cards.

* Cleaned up menu for manga reader and changed how automatic scaling works, based on ratio of width to height rather than raw numbers.

* Fixed an issue where using left/right keys on book reader wouldn't behave like clicking left/right pagination buttons.

* Dark mode and click to paginate was conflicting. The hint overlay still doesn't work when dark mode is on.

* Fixed issue where errors from login flow would not throw a toastr

* Moved the progress bar and go to page into the side drawer to be less distracting when reading

* Removed console.logs

* Cleaned up styles on slider to be closer to size of cards

* Fixed an issue with swiper not allowing use of touch (#149)

* Fixed in progress by on last page incrementing to maxPages itself, thus ensuring it matches the sum of pages. (#151)

* Bugfix/in progress (#156)

* Fixed in progress by on last page incrementing to maxPages itself, thus ensuring it matches the sum of pages.

* Actually fix in progress by only incrementing page num on bookmark when we are on the last page

* Impleents tap to paginate user setting. (#157)

* Feature/manga reader (#160)

* Implemented pressing G to open go to page. Enhanced the dialog to give how many pages you can go to. On page splitting button press, if the current page needs splitting, we will re-render with the new option.

* Added gotopage shortcut key for book reader

* Setup for new feature

* Swiper now respects card sizes

* Fixes #51 and updates dependencies for security vulnerabilities

* Implemented back to top button

* Remove the - 1 hack from series-detail

* Remove hack from carad item

* Fix a regression where book reader would +1 pageNum for bookmarking on last page, but because books don't start at 0 for page nums, it isn't necessariy

* Implemented the ability to move between volumes automatically

* Additional security fix

* Code smells

* Cleaned up the implementation to properly prevent pagination when loading next chapter/volume

* v0.4 Last touches (#162)

* PurgeCSS integration

* Changed some icons to have titles

* Automatic scaling changes

* Removed 2 font families that didn't make the release cut. Fixed an off by 1 regression with setContinuePoint

* Backed out purge css after testing

* Some cleanup of the package

* Automatic scaling adjustments

* Bugfix/release shakeout (#164)

* Fixed body color not being reset due to capturing it too late

* Removed some dead code

* Implemented dark mode (#166)

* Implemented dark mode

* Bump version to v0.4.1, moved dark styles to own stylesheet (some files need dark overrides) and ensured all pages are styled correctly.

* Switched the code over to use bootstrap theme with Kavita color

* Bugfix/manga issues (#169)

* Fixes #168

* Fixed a bug on the manga reader that caused the background color to inherit from body rather than be forced black.
Fixed an issue where a long filename on a phone could make it hard to close menu once open.

* Sentry Integration (#170)

* Basic version of sentry is implemented

* Enhanced continuous reading to show a warning when we couldn't find the next reading point. This will also short circuit after the first warning is shown

* Implemented Sentry. Currently src maps aren't uploading

* Bugfixes/misc (#174)

* Fixes #171

* Ensure btn-information is properly styled in dark mode

* no trace sampling for UI

* Fixed an issue where when we had no read progress, when choosing firs… (#176)

* Fixed an issue where when we had no read progress, when choosing first volume, we'd use first chapter, but sometimes chapters wouldn't be ordered.

* Code smell

* Collection Support (#179)

* Home button should go to library page, so we can use back and return to where we clicked from.

* Implemented Collection Support

* Fixed an issue for search in nav bar in darkmode

* Move loading to the top of the book reader

* Added DOMHelper to help with accessibility

* Implemented a re-usable layout component for all card layout screens. Handles pagination.

* Fixes #175

* Additional RBS check for tags where the tag fragment is invalid or there are no libraries that a user has access to

* Introduced an edit collection tag modal and actionables for collection tags.

* Bump version of Sentry SDK.

* Ability to remove series from a tag in a bulk manner.

* Continue Reading Regression (#186)

* Added a dark placeholder image for dark mode and hooked it up to Image service to load correct placeholder

* Fixed #181. Rewrote the continue logic to only check chapters and removed the concept of volumes (since every volume has a chapter). Opening a volume now does it's own check if there is progress on the volume, it will open to where the user left off. Otherwise, it will grab the first chapter and start at the beginning.

* Added dark error placeholder image (#187)

* Bugfix/misc (#188)

* Fixed an issue where carousel series cards scan library would kick off for wrong library id.

* Refactored the tab code to be dynamic based on the volume/chapter/specials of the data. The correct tab will be default selected and tabs that don't need to exist wont.

* Some css adjustments for typeaheads

* Move the loader out of the action bar so if settings menu is open when navigating pages, the math doesn't break

* Fixed a bug where highlight wasn't updating correctly when we type or after we add a tag via keyboard

* Fix an exception when tags are null (due to a bug in release)

* Accessibility bugs

* Collection Tweaks (#190)

* Fixed an issue where carousel series cards scan library would kick off for wrong library id.

* Refactored the tab code to be dynamic based on the volume/chapter/specials of the data. The correct tab will be default selected and tabs that don't need to exist wont.

* Some css adjustments for typeaheads

* Move the loader out of the action bar so if settings menu is open when navigating pages, the math doesn't break

* Fixed a bug where highlight wasn't updating correctly when we type or after we add a tag via keyboard

* Fix an exception when tags are null (due to a bug in release)

* Accessibility bugs

* Fixed #189 and cleaned up series pagination.

* Major cleanup of the typeahead code. One bug remaining

* Fixed highlight issue

* Fixed #183. When using continuous manga reading, moving to another chapter within the reader now updates the url. (#191)

* Book Parity: Reading direction for books (#192)

* Fixed pagination issue on library-detail

* Implemented left to right/right to left reading mode in book reader

* feat: remove Webtoon option from Library Types (#194)

#251

* Book Reading Progress Enhancement (#196)

* Implemented the ability to bookmark and restore reading progress (scroll) for books.

* Check to make sure we have something to search before we perform a querySelectorAll

* Don't reload a page when we've hit the boundaries of min/max pages and are trying to spam left/right key.

* Fixed a bug where if kavita-part marker was on the same page, the conditional was always true, meaning that when it was on a different one, we wouldn't load it up.

* Bugfix/tab refactor (#197)

* Fixed a logic bug which hid the specials tab too aggressively

* Unsubscribe from observables on destroy of account service

* Recently Added Page (#198)

* Recently Added Page
* Changed default pagination to 30

* Update to CSS for homepage section title links (#201)

* Update to CSS for homepage section title links

* Adding :active and :focus selectors

- :active for accessibility best practice and UX.
- :focus for mobile.

* Fixed #202 - Scope list item hover styles in darkmode to only typeahead (#204)

* Double Flashing Fix (#206)

* Fixed #202 - Scope list item hover styles in darkmode to only typeahead

* Fixed #199 - Flickering when paginating

* Fixed an issue with Continue Reading not working after manually updating a volume with multiple chapters as read/unread (#211)

* Directory Picker UX Enhancements (#214)

* Added a filter and some css to the directory picker to make it more useable

* Fixed a bug where last goBack didn't reload the disks and kept the directories from the last selected node.

* Allow user to change port (#215)

* Allow the admin to configure the log level from the UI. Add a warning informing them restart is required for port and log level. (#217)

* Cleaned up some console.logs and tweaked the logic of scroll position remembering. Now the side nav chapter list will show what part you are on (if applicable). (#220)

* Specials Sort (#223)

* Implemented a natural sort (same as BE) to sort the specials so the order isn't completely random

* Added ability to push source maps tagged to a release on push to main and develop (#219)

* Create Library Feedback (#224)

# Added
- Library type and number of folders shared is now visible on Manage Libraries page

# Changed
- Directory Picker will now let you share the current folder from any time in the picker flow
- Headings are now consistent between User Preferences and Admin screen

* Fixing folder structure for sentry github action (#225)

* Updating workflow environment (#226)

Sentry workflow was giving an error: "Error: Container action is only supported on Linux"

* Fixing build dist path for sentry (#227)

* Updating workflow environment

Sentry workflow was giving an error: "Error: Container action is only supported on Linux"

* update build dist path for sentry

* fix: unable to select lib type when creating a new lib (#231)

* fix: unable to select lib type when creating a new lib

fixed #230

* fix: able to change lib type after it's creation

* Download Support (#229)

* Implemented the ability to download series/chapter/volume from server. Uses RBS to determine if a user can or cannot download.

* Safety Checks (#233)

* Fixes a safety check from Sentry ANGULAR-1Z

* Fixed a build issue from downloading branch

* Fix/234 235 login redirection and dark theme not working (#236)

* fix: login redirection not happening

#234

* fix: dark theme not working after logout

#235

* Remove SP marker from specials and also remove extension from specials. (#238)

* Remove SP marker from specials and also remove extension from specials.

* Sort first so we can take advantage of the SP number

* Error Handling Rework (#237)

* Updated ngx-toastr version (includes new styles), updated style.scss to be cleaner. Began adding Title service for accessibility.

* Reworked error interceptor and toastr service to reduce duplicates and properly show errors.

Co-authored-by: Milazzo, Joseph (jm520e) <jm520e@us.att.com>

* Fixed a prod only issue due to multi: true for provider (#243)

* Feat/usage stats collection (#245)

* feat: add client anonymous data collection

* fix: sonar issues

* Implemented a server setting to opt-out of usage collection

Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>

* Book Progress Enhancements (#250)

* Implemented the ability to bookmark any part of the book, not just the chapter parts

* Added total pages label to the book reader

* Manga Reader Redesign + Webtoon Reader (#247)

# New
- Bottom drawer has a scroller to jump to pages, jump to first/last page, and jump between volume/chapters. 
- Quick actions easily available to change reading direction, change reader mode, color tones, and access extended settings
- Extended settings area for settings unlikely changed
- Ability to auto close menu (setting)
- Ability to apply extra darkness or a sepia tone to reduce blue light
- New reader modes: Left/Right, Up/Down, Webtoon (scroll up and down)
- Information about the volume/chapter you are reading is now showed in the top drawer

# Changed
- When applying reader modes or reading directions, the clickable areas will now show an overlay to help you understand where to click.
- Image scaling and Image splitting now show some contextual icons to help the user understand what they do
- Close book button is now in the top drawer menu

* Bugfix/toastr css updates (#249)

* CSS Updates

- Removed BS4 toastr styles
- Reinstituted default non-BS4 toastr styles
- Centered login (accounting for header)
- Adjusted the carousel section heading font-size.
- Added a small padding (5px) on top of the padding for the nav, so the text isn't so close to the nav.

* Login refresh & toaster styles

- Added new font for login
- Updated login styles
- Hide nav bar on logout
- show nav bar on login
- Added images for new login
- dark styles for login
- dark styles for toastr

* minified images

* sonar bug fix

* updating style url for minified asset

* Fixes and code smells

- fix for login bg image showing up elsewhere
- fix for code smells
- added font family to nav bar

* Fixed missing label/input linking

* resized, compressed, and minified bg image

- change opacity to dark mode login

* Changed Spartan font files to variable weight

* Change requests

- Added font license
- Renamed image used for login bg
- Fixed path in styles where above file was used
- Removed now unused bs4 toastr style import

Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>

* Fix a bad version number

* hotfix for docker build issue (#251)

* updating angular.json

changing output folder

* change path

* Fixed build issues (#252)

* Bugs! (#254)

* Fix style issue where bootstrap components weren't taking kavita overrides

* Fixed a bug where after updating certain things within a card on library page, the feeds wouldn't update

* Fixed a bug where chapter sort would not behave the same way as on chrome

* Release canidate bugs (#255)


  *  Auto Close menu wasn't updating within reader
  *  (Book Reader) Enhanced scroll part code to limit elements we count for bookmarking, only calculating intersection once fully visible and saving when scroll ends
 *   Removed Image Smoothing option (chrome only) from this release. No noticeable difference having it.
 * Fixed a page reload when clicking on In Progress section title on home page

* Bugfix/webtoons (#256)

* Fixed issue where first load would not start capturing scroll events due to not knowing the scroll to an element finished.

* Changed how to figure out when to end scrolling event by calculating if the target element is visible in the viewport.

* Seems to be working pretty well. Cleaned up some of the messages for debugging.

* Simplified the intersection logic drastically

* Fixed a color issue on slider for non-dark mode

* Disable first/last page buttons if we are already on those respective pages

* Added documentation to circular array class

* Some debug code but scrolling no longer results in jank due to scrollToPage getting executed too often

* Backing out ability to use webtoon reader

* Css fix for book reader progress and light mode toastr (#257)

* Changing dark mode to default (#262)

- Changed user-preferences site dark mode to default true

* added logo and css for logo (#260)

* added logo and css for logo

- max-height is to prevent the image from increasing the height of the navbar.
- middle middle vertical align didn't look to match up as expected, so a top middle was implemented based on chrome and firefox renderings.

* Adding requested accessibility changes

* Added Kavita-webui repo to UI/Web

* Special parsing issues (#361)

* Update README.md

Added demo link to Readme and tweaked Sentry icon

* Adds some regex cases from manga downloaded through FMD2. For parsing specials, if the marker is found, try to overwrite the series with the folder the manga is in, rather than what we parse from filename.

* Version bump

* Changed company to point to our domain

* Fixed copyright to point to our domain

* Adding test github workflow and test build file (#362)

* Fixing copy fail in monorepo-test workflow

* fixing shell script to be executable

* fixing permission issue

* Folder Parsing (#366)

* New: Ability to parse volume and chapter from directory tree, rather than exclusively from filename. (#313)
* Fixed: Fixed an edge case where GetFoldersTillRoot if given a non-existent root in the file path, would result in an infinite loop.

* Book Reader Bugs (#367)

* Fixed:  Fixed an issue where when tap to paginate is on, clicking off the settings menu doesn't close it.
* Fixed: Fixed the tint color on book reader being different from manga reader.
* Fixed: Reworked the clickable overlay for tap to paginate so links are still clickable when tap to paginate is on.

* Build on monorepo

* Book Reader Intersection Handler not firing  (#369)

* Fixed: Fixed an issue where intersection observer wouldn't be triggered when book page had no images (Book reader bookmark not firing while scrolling #360)

* Raw Image Support (#375)

* New: Ability to add Raw Image folders to Kavita via new library Types Images (Comic) and Images (Manga). Images must belong to a folder, they cannot exist in the root directory. It is important to at least put a second folder (minimum) with a Volume of Chapter, else you will end up with each image as a special which is not easily readable.
* Changed: When caching images for raw images, do it much faster and return earlier if the files have already been cached.


Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Fixed a bug in the circular array which would not properly roll index over for applyFor (#377)

* Fixed: Manga reader's prefetching buffer had issues with rolling over index, which would require a manual image load every 7 pages. (#372)

* Adding new ui dist folder to gitignore

* Added stats folder persistence (#382)

* Added demo link to Readme and tweaked Sentry icon

* Added a symbolic link to persist the stats folder between docker container updates.

Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>

* Lots of UI fixes and changes (#383)

* After we flatten, remove any non image files as we shouldn't iterate over them

* Fixed a case for next/prev chapter where if we have a volume then chapters attached afterwards, there would be improper movement due to how sorting works.

* Fixed an issue where no-connection would not resume where the loss of connection occured

* Fixed an issue where after creating a new user, their Last Active Date would show as a weird date, instead of "Never"

* Sort files in card detail to mimic reading order

* Implemented a single source of executing actions (card or main page) and added actionables on library detail page.

* Refactored series actions into action service

* Implemented common handling for entity actions in a dedicated service

* Fixed build script for new monorepo layout.

* Cleaned up nav header subscriptions

* Updated the favicon/icons to work on different devices as home screen shortcuts


* Fixed: Fixed issue where if you had a volume with 1 volume based file and a chapter file, the next/prev chapters wouldn't work (Fixes #380)
* Fixed: When connection is lost to backend, saving current page url and resuming when connection reestablished was not working (Fixes #379)
* Fixed: When creating a new user, a strange date format was shown in Last Active due to not having been active. Now "Never" shows (Fixes #376)
* Fixed: When showing files for a volume/chapter, the files are now sorted in the order you will read them in (Fixes #378)
* Added: Library detail now has actionable menu next to header, so you can kick off a scan or metadata refresh (Closes #363)
* Changed: When performing actions like marking as read/unread on series detail page, the actionable button will disable until the request finishes. (Closes #381)
* Changed: Favicon and Icons have been updated so when saving webpage to home screen, it should show a proper icon (Closes #356)

* Lots of Bugfixes and Tweaks (#387)

* Fixed: Fixed a bug in how we get images. When dealing with raw images, we need special logic (Monorepo)
* Added: (Manga Reader) When we are within 10 pages of the beginning of a manga, prefetch the prev chapter
* Fixed: (Manga Reader) The slider would sometime skip pages and would have leftover track on last page. 
* Fixed: (Raw Images) When calculating cover image for Raw Image entities, only select image files
* Fixed: Fixed a logic bug where raw image based entities wouldn't send back the correct page (Monorepo)
* Changed: When deleting a library, it can take a long time. Disable delete buttons until the deletion finishes
* Added: (Parser) Added a regex case for "Series - Ch. 20 - Part"
* Changed: Try to show the files in volume/chapter detail modal in the reading order. 
* Fixed: Next/Previous chapter was not working in all cases from previous Monorepo commit.

* Bugfix/locked name reset (#389)

* Fixed: Fixed an issue where if you manually rename a series, then remove/modify an entity related to the series, the series would be deleted and re-created with the original, parsed name.

* Scan Series (#390)

* Refactored Library delete to use a transaction.

* Ensure we parse "Series Name - Chapter XXX" before "Series Name - Vol XXX"

* Ensure if GetFoldersTillRoot is called with a fullPath containing a file, that we ignore the file for returned folders.

* Changed: From the series actionable menu, instead of scan library, which would kick off a filesystem scan on the library the series belonged to, instead we have "scan series" which will scan the folders represented by that series. If that series has files in the root of the library, the library root is scanned, but only said series files will be processed. This can make a refresh occur in under 500 ms (Fixes #371)
* Fixed: Fixed a bad parsing case for "Series Name - Vol.01 Chapter 029 8 Years Ago" where somehow the chapter would parse as "029 8", thus making the file a special rather than chapter 29.

* Fixes a bug where the root path and the full path share a common word, like root: "/Test library" and full path "/Test library/Test" which caused "/Test" to be taken out of root and thus GetFoldersTillRoot would never finish

* About Section (#394)


* Added: Added an about section with version, links to discord, github, donations, etc.
* Fixed: Fixed some parsing issues that caused "Series Name - Volume X Chapter Y" to parse as "Series Name - Volume X" from a previous change in develop.

* Cleaning up monorepo build files

* Fixing permission issues

Co-authored-by: Leonardo Dias <leo.rock14@gmail.com>
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
Co-authored-by: Leonardo Dias <contato.leonardod@yahoo.com>
Co-authored-by: Milazzo, Joseph (jm520e) <jm520e@us.att.com>
Co-authored-by: Chris Plaatjes <kizaing@gmail.com>
2021-07-17 14:03:11 -05:00
Joseph Milazzo
be2b78fa5a
Manga Redesign (#321)
* Code cleanup, refactored FileRepository into Unit of Work.

* Added AutoCloseMenu and ReaderMode user perferences to match UI

* Added extra information to ChapterInfo

* Build changes

* Updated the readme to have open collective information and thanks to sponsors

* Fixed an issue with UnitOfWork refactor and how stats was bootsrapped. Replaced stats.kavitareader with a temp url to test out redirection bug.
2021-06-24 19:31:42 -05:00
Leonardo Dias
1c9b2572ae
Feat/usage stats collection (#317)
* feat: implement anonymous usage data collection

Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
2021-06-20 17:26:35 -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
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
9c61c26807
v0.4 merge to stable (#201)
* Fix directory issue when building all the packages where directory got skewed. (#98)

* Bump version for patch release due to bug in continue fuctionality. (#104)

* Chore/version bump (#106)

* Bump version for patch release due to bug in continue fuctionality.

* Added develop branch for github actions

* Updated readme to have an image and support link. (#107)

* Feature/readme (#109)

* Updated readme to have an image and support link.

* Updated readme

* Fixed a bug where if a chapter had multiple archive files, they wouldn't all be extracted due to short circuit in ExtractArchive. Now I add the file id then flatten afterwards. (#113)

* Bugfix/multiple file extract (#116)

* Fixed a bug where if a chapter had multiple archive files, they wouldn't all be extracted due to short circuit in ExtractArchive. Now I add the file id then flatten afterwards.

* Fixed a bug where due to how we were extracting for multiple files, the single file extractions failed.

* Bumped release for 3.5 release

* Comic Support (#119)

* Implemented some basic regex for comic support

* Implemented support for comics

* empty filenames, like .test.jpg shouldn't be counted as image types.

* Fixed some regex for Manga's with commas or version tags in parenthesis.

* More cases for parsing regex

* Lots of Parsing Enhancements (#120)

* More cases for parsing regex

* Implemented the ability to parse "Special" keywords.

* Commented out some unit tests

* More parsing cases

* Fixed unit tests

* Fixed typo in build script

* Parsing Enhancements (#126)

* More cases for parsing regex

* Implemented the ability to parse "Special" keywords.

* Commented out some unit tests

* More parsing cases

* Fixed unit tests

* Fixed typo in build script

* Fixed a bug where if there was a series with same name, but different capitalization, we wouldn't process it's infos.

* Tons of regex updates to handle more cases.

* More regex tweaking to handle as many cases as possible.

* Bad merge caused the comic parser to break. Fixed with some better regex.

* Parser Enhancement: Fallback to Folder name (#129)

* More cases for parsing regex

* Implemented GetFoldersTillRoot for falling back on parsing when we can't get anything from the filename.

* Implemented a fallback strategy. Not tested on large libraries yet.

* Fallback tested and working great.

* Removed a test case that won't pass and added some trims

* Update README.md

Added build steps

* Update README.md (#130)

Added docker link

* Special Grouping (#134)

* More cases for parsing regex

* Implemented a change to fix old special grouping. Added some TODOs as well for a future enhancement

* Don't go to archive file if it hasn't updated since last scan (#135)

* Skip archive work unless the file has actually changed since last scan.

* In Progress Activity Stream Fixes (#136)

* Fixed a bug in In-Progress where it wasn't properly fetching series.

* Fixed a bug where chapter cover images weren't being updated due to a missed not.

* Removed a piece of code that was needed for upgrading, since all beta users agreed to wipe db.

* Fixed InProgress to properly respect order and show more recent activity first. Issue is with IEntityDate LastModified not updating in DataContext.

* Updated dependencies to lastest stable.

* LastModified on Volumes wasn't updating, validated it does update when data is changed.

* In Progress Query Update (#145)

* Fixed a bug where chapter cover images weren't being updated due to a missed not.

* Removed a piece of code that was needed for upgrading, since all beta users agreed to wipe db.

* Fixed InProgress to properly respect order and show more recent activity first. Issue is with IEntityDate LastModified not updating in DataContext.

* Updated dependencies to lastest stable.

* LastModified on Volumes wasn't updating, validated it does update when data is changed.

* Performance, Scan Loop, Specials, and cleanup (#150)

* More cases for parsing regex

* Fixed a bug where chapter cover images weren't being updated due to a missed not.

* Removed a piece of code that was needed for upgrading, since all beta users agreed to wipe db.

* Fixed InProgress to properly respect order and show more recent activity first. Issue is with IEntityDate LastModified not updating in DataContext.

* Updated dependencies to lastest stable.

* LastModified on Volumes wasn't updating, validated it does update when data is changed.

* Rewrote a check to avoid a small heap object warning.

* Ensure UpdateSeries checks all libraries for unique name.

* Took care of some todos, removed unused imports, on dev go ahead and schedule reoocuring jobs since LiteDB caused the locking issue.

* No Tracking when we aren't using entities.

* Added code to remove abandoned progress rows after a chapter gets deleted.

* RefreshMetadata uses one large query rather than many trips to DB for updating metadata. Significantly faster.

* Fixed a bug where UpdateSeries would always complain about a unique name even when we weren't updating name.

* Files that are linked to a series but can't parse out Vol/Chapter information are properly grouped like other Specials.

* Refresh metadata on UI should call the task directly

* Fixed a bug on updating series to make sure we don't complain if we aren't trying to update the name to an existing name.

* Fixed #142 - Library cards should be sorted.

* Refactored the name of some variables to be more agnostic to comics.

* Implemented ScanLibrary but abandoning it.

* Code Cleanup & removing ScanSeries code.

* Some more tests and new Comparators for natural sorting.

* Fixed #137 - When performing I/O on archives, ignore __MACOSX folders completely.

* Fixed #137 - When performing I/O on archives, ignore __MACOSX folders completely.

* All entities that will show under specials tab should be marked special, rather than just what has a special keyword.

* Don't let specials generate cover images

* Don't let specials generate cover images

* SearchResults should send LocalizedName back since we are searching against it.

* Added some tests around macosx folders found from my actual server.

* Put extra notes about a case where duplicates come about, logger will now tell user about this issue.

* Missed a build issue somehow...

* Some code smells

* Bugfixes! (#157)

* More cases for parsing regex

* Fixed a bug where chapter cover images weren't being updated due to a missed not.

* Removed a piece of code that was needed for upgrading, since all beta users agreed to wipe db.

* Fixed InProgress to properly respect order and show more recent activity first. Issue is with IEntityDate LastModified not updating in DataContext.

* Updated dependencies to lastest stable.

* LastModified on Volumes wasn't updating, validated it does update when data is changed.

* Fixed #152 - Sorting issue when finding cover image.

* Fixed #151 - Sort files during scan.

* Fixed #161 - Remove files that don't exist from chapters during scan.

* Fixed #155 - Ignore images that start with !, expand cover detection by checking for the word cover as well as folder, and some code cleanup to make code more concise.

* Fixed #153 - Ensure that we persist series name changes and don't override on scanning.

* Fixed a broken unit test

* Version bump

* I keep fixing this but it keeps reverting (#158)

* Fixed #165 - Login and Registration will allow case-insensitive usernames now. (#169)

* Cover Image - First and tests (#170)

* Changed how natural sort works to cover more cases

* Changed the name of CoverImage regex for Parser and added more cases.

* Changed how we get result from Task.Run()

* Defer execution of a loop till we really need it and added another TODO for later this iteration.

* Big refactor to cover image code to unify between IOCompression and SharpCompress. Both use methods to find the correct file. This results in one extra loop through entries, but simplifies code signficantly.

In addition, new unit tests for the methods that actually do the logic on choosing cover file and first file.

* Removed dead code

* Added missing doc

* Feature/unit tests (#171)

* Removed a duplicate loop that was already done earlier in method.

* Normalize now replaces underscores

* Added more Parser cases, Added test case for SeriesExtension (Name in List), and added MergeNameTest and some TODOs for where tests should go

* Added a test for removal

* Fixed bad merge

Co-authored-by: Andrew Song <asong641@gmail.com>

* Feature/bugfix and regex (#174)

* Fixed #172

* Fixes #164

* Added a parse test for [Hidoi]_Amaenaideyo_MS_vol01_chp02.rar

* Fix annoying warning about SplitQuery on GetLibraryDtosForUsernameAsync

* Scan Bugfixes (#177)

* Added way  more logging for debugging issue #163.

Fixed #175

* Removed some comment that isn't needed

* Fixed a enumeration issue due to removing while enumerating

* EPUB Support (#178)

* Added book filetype detection and reorganized tests due to size of file

* Added ability to get basic Parse Info from Book and Pages.

* We can now scan books and get them in a library with cover images.

* Take the first image in the epub if the cover isn't set.

* Implemented the ability to unzip the ebup to cache. Implemented a test api to load html files.

* Just some test code to figure out how to approach this.

* Fixed some merge conflicts

* Removed some dead code from merge

* Snapshot: I can now load everything properly into the UI by rewriting the urls before I send them back. I don't notice any lag from this method. It can be optimized further.

* Implemented a way to load the content in the browser not via an iframe.

* Added a note

* Anchor mappings is complete. New anchors are updated so references now resolve to javascript:void() for UI to take care of internally loading and the appropriate page is mapped to it. Anchors that are external have target="_blank" added so they don't force you out of the app and styles are of course inlined.

* Oops i need this

* Table of contents api implemented (rough) and some small enhancements to codebase for books.

* GetBookPageResources now only loads files from within the book. Nested chapter list support and images now use html parsing instead of string parsing.

* Fonts now are remapped to load from endpoint.

* book-resources now uses a key, ensuring the file is in proper format for lookup. Changed chapter list based on structure with one HEADER and nested chapters.

* Properly handle svg resource requests and when there are part anchors that are clickable, make sure we handle them in the UI by adding a kavita-page handler.

* Add Chapter group page even if one isn't set by using first page (without part) from nestedChildren.

* Added extra debug code for issue #163.

* Added new user preferences for books and updated the css so we scope it to our reading section.

* Cleaned up style code

* Implemented ability to save book preferences and some cleanup on existing apis.

* Added an api for checking if a user has read something in a library type before.

* Forgot to make sure the has reading progress is against a user lol.

* Remove cacheservice code for books, sine we use an in-memory method

* Handle svg images as well

* Enhanced cover image extraction to check for a "cover" image if the cover image wasn't set in OPF before falling back to the first image.

* Fixed an issue with special books not properly generating metadata due to not having filename set.

* Cleanup, removed warmup task code from statup/program and changed taskscheduler to schedule tasks on startup only (or if tasks are changed from UI).

* Code cleanup

* Code cleanup

* So much code. Lots of refactors to try to test scanner service. Moved a lot of the queries into Extensions to allow to easier test, even though it's hacky. Support @font-face src:url swaps with ' and ". Source summary information from epubs.

* Well...baseURL needs to come from BE and not from UI lol.

* Adjusted migrations so default values match Entity

* Removed comment

* I think I finally fixed #163! The issue was that when i checked if it had a parserInfo, i wasn't considering that the chapter range might have a - in it (0-6) and so when the code to check if range could parse out a number failed, it treated it like a special and checked range against info's filename.

* Some bugfixes

* Lots of testing, extracting code to make it easier to test. This code is buggy, but fixed a bug where 1) If we changed the normalization code, we would remove the whole db during a scan and 2) We weren't actually removing series properly.

Other than that, code is being extracted to remove duplication and centralize logic.

* More code cleanup and test cleanup to ensure scan loop is working as expected and matches expectaions from tests.

* Cleaned up the code and made it so if I change normalization, which I do in this branch, it wont break existing DBs.

* Some comic parser changes for partial chapter support.

* Added some code for directory service and scanner service along with python code to generate test files (not used yet). Fixed up all the tests.

* Code smells

* Book Feedback and small bugs (#183)

* Remove automatic retry for scanLibraries as if something fails, it wont pass magically. Catch exceptions when opening books for parsing and swallow to ignore the file.

* Delete extra attempts

* Switched to using FirstOrDefault for finding existing series. This will help avoid pointless crashes.

* Updated message when duplicate series are found (not sure how this happens)

* Fixed a negation for deleting volumes where files still exist.

* Implemented the ability to automatically scale the manga reader based on screen size.

* Feature/feedback (#185)

* Remove automatic retry for scanLibraries as if something fails, it wont pass magically. Catch exceptions when opening books for parsing and swallow to ignore the file.

* Delete extra attempts

* Switched to using FirstOrDefault for finding existing series. This will help avoid pointless crashes.

* Updated message when duplicate series are found (not sure how this happens)

* Fixed a negation for deleting volumes where files still exist.

* Implemented the ability to automatically scale the manga reader based on screen size.

* Default to automatic scaling

* Fix an issue where malformed epubs wouldn't be readable due to incorrect keys in the OPF. We now check if key is valid and if not, try to correct it. This makes a page load about a second on malformed books.

* Fixed #176. Refactored the recently added query to be restricted to user's access to libraries.

* Fixed a one off bug with In Progress series

* Implemented the ability to refresh metadata of just a single series directly

* Book Feedback (#190)

* Remove automatic retry for scanLibraries as if something fails, it wont pass magically. Catch exceptions when opening books for parsing and swallow to ignore the file.

* Delete extra attempts

* Switched to using FirstOrDefault for finding existing series. This will help avoid pointless crashes.

* Updated message when duplicate series are found (not sure how this happens)

* Fixed a negation for deleting volumes where files still exist.

* Implemented the ability to automatically scale the manga reader based on screen size.

* Default to automatic scaling

* Fix an issue where malformed epubs wouldn't be readable due to incorrect keys in the OPF. We now check if key is valid and if not, try to correct it. This makes a page load about a second on malformed books.

* Fixed #176. Refactored the recently added query to be restricted to user's access to libraries.

* Fixed a one off bug with In Progress series

* Implemented the ability to refresh metadata of just a single series directly

* Fixed a parser case where Series c000 (v01) would fail to parse the series

* Fixed #189. In Progress now returns data properly for library access and in multiple libraries.

* Fixed #188 by adding an extra message for bad login and updating UI

* Generate a fallback for table of contents by parsing the toc file (if we can find one)

* Bugfixes/misc (#196)

* Removed an error log statment which wasn't valid. Was showing error when a comicinfo.xml was not found in a directory.

* Fixed #191. Don't overwrite summary information if we already have something set from UI.

* Fixes #192

* Fixed #194 by moving the Take to after the query runs, so we take only distinct series.

* Added another case for Regex parsing for VanDread-v01-c01.zip

* Tap to Paginate User Pref (#197)

* Fixed In Progress and removed comments

* Tap to Paginate user setting is implemented. Fixes #193

* Implemented the ability to move between volumes (reading) automatically without existing the app. (#198)

* Feature/tech debt (#199)

* Added an icon for building the exe

* Technical debt

* Updated Readme for recruitment

* Regex addition (#200)

Co-authored-by: Andrew Song <asong641@gmail.com>
2021-05-08 18:37:45 -05:00
Joseph Milazzo
d73bd22db2 Some code cleanup 2021-03-23 12:22:47 -05:00
Joseph Milazzo
a125b2ac0b Fixed GetInProgress API - The condition for PagesRead needed to be a sum for all progress, not each row. 2021-03-18 14:18:56 -05:00
Joseph Milazzo
0a85555f38 Temp commit to record attempts. Stream APIs are implemented and working. Added some new test cases based on deployed Kavita server testing. 2021-03-17 14:29:50 -05:00
Joseph Milazzo
6e6e5ee9f2 Implemented a startup task that will instantiate all the DI so first API isn't having to eat that overhead. 2021-03-13 17:44:29 -06:00
Joseph Milazzo
ecfb40cb2d Moved some files around, fixed Log file fetching to use zip and work more reliably. Refactored some code in directory service. 2021-02-24 15:58:17 -06:00
Joseph Milazzo
bbb4240e20 Implemented download log files (not in service). Refactored backupservice to handle log file splitting. Improved a few interfaces and added some unit tests around them. 2021-02-24 11:59:16 -06:00
Joseph Milazzo
b4ee16d8d1 Code cleanup. Implemented ability to schedule Library Backups. 2021-02-17 08:58:36 -06:00
Joseph Milazzo
d8d01ffaf6 More refactoring around ScannerService. Moved metadata into its own service. Focusing on cleaning up ScanLibrary code to work 100%. 2021-02-08 16:44:18 -06:00
Joseph Milazzo
f430595d11 Attempted to Test CacheService, but can't figure it out. 2021-01-26 14:35:50 -06:00
Joseph Milazzo
a057e3ce1d Lots of bug fixes around publishing and handling weird cases on a real manga library. Implemented ability to have Volumes number 0 aka just latest chapters. Refactored DirectoryService code for scanning into it's own service. Lots of debug code, will be cleaned up later. 2021-01-23 17:44:48 -06:00
Joseph Milazzo
825afd83a2 Removed some dead code on the interfaces. Introduced UnitOfWork to simplify repo injection. 2021-01-18 13:07:48 -06:00
Joseph Milazzo
731e3a9c5e Cache cleanup implemented 2021-01-11 15:39:25 -06:00
Joseph Milazzo
cd8a1d2892 Added a basic cache service to handle interations with the underlying cache implementation. Refactored some code to be more robust. 2021-01-09 16:14:28 -06:00
Joseph Milazzo
380c3e7b3c Rough version of Saving Series, Volumes, and MangaFiles to the DB. Relies on Cascaded delete rather than manually handling updating of file changes. 2020-12-30 11:30:12 -06:00
Joseph Milazzo
4fd9943b91 Added Hangfire with LiteDB for a task running system. At the most basic, this allows us to monitor tasks running on the system (during dev only) and run tasks on a reoccuring or ad-hoc basis. 2020-12-26 14:03:35 -06:00
Joseph Milazzo
d5eed4e85d Lots of changes to get code ready to add library. 2020-12-17 11:27:19 -06:00
Joseph Milazzo
13ed323949 Added new API for getting Member (aka Users but for use in FE). User is just used for login/registering. 2020-12-14 14:33:09 -06:00
Joseph Milazzo
2b521924d0 Setup basic code for login. 2020-12-12 20:14:56 -06:00