29 Commits

Author SHA1 Message Date
Joe Milazzo
ac3fe0b1f4
v0.6.0 - Polish, Polish, Polish + Send To Support! (#1604)
* New Scan Loop (#1447)

* Staging the code for the new scan loop.

* Implemented a basic idea of changes on drives triggering scan loop. Issues: 1. Scan by folder does not work, 2. Queuing system is very hacky and needs a separate thread, 3. Performance degregation could be very real.

* Started writing unit test for new loop code

* Implemented a basic method to scan a folder path with ignore support (not implemented, code in place)

* Added some code to the parser to build out the idea of processing series in batches based on some top level folder.

* Scan Series now uses the new code (folder based parsing) and now handles the LocalizedSeries issue.

* Got library scan working with the new folder-based scan loop. Updated code to set FolderPath (for improved scan times and partial scan support).

* Wrote some notes on update library scan loop.

* Removed migration for merge

* Reapplied the SeriesFolder migration after merge

* Refactored a check that used multiple db calls into one.

* Made lots of progress on ignore support, but some confusion on underlying library. Ticket created. On hold till then.

* Updated Scan Library and Scan Series to exit early if no changes are on the underlying folders that need to be scanned.

* Implemented the ability to have .kavitaignore files within your directories and Kavita will parse them and ignore files and directories based on rules within them.

* Fixed an issue where ignore files nested wouldn't stack with higher level ignores

* Wrote out some basic code that showcases how we can scan series or library based on file events on the underlying system. Very buggy, needs lots of edge case testing and logging and dupplication checking.

* Things are working kinda. I'm getting lost in my own code and complexity. I'm not sure it's worth it.

* Refactored ScanFiles out to Directory Service.

* Refactored more code out to keep the code clean.

* More unit tests

* Refactored the signature of ParsedSeries to use IList. Started writing unit tests and reworked the UpdateLibrary to work how it used to with new scan loop code (note: using async update library/series does not work).

* Fixed the bug where processSeriesInfos was being invoked twice per series and made the code work very similar to old code (except loose leaf files dont work) but with folder based scanning.

* Prep for unit tests (updating broken ones with new implementations)

* Just some notes. Not sure I want to finish this work.

* Refactored the LibraryWatcher with some comments and state variables.

* Undid the migrations in case I don't move forward with this branch

* Started to clean the code and prepare for finishing this work.

* Fixed a bad merge

* Updated signatures to cleanup the code and commit to the new strategy for scanning.

* Swapped out the code with async processing of series on a small library

* The new scan loop is working in both Sync and Async methods. The code is slow and not optimized. This represents a good point to start polling and applying optimizations.

* Refactored UpdateSeries out of Scanner and into a dedicated file.

* Refactored how ProcessTasks are awaited to allow more async

* Fixed an issue where side nav item wouldn't show correct highlight and migrated to OnPush

* Moved where we start to stopwatch to encapsulate the full scan

* Cleaned up SignalR events to report correctly (still needs a redesign)

* Remove the "remove" code until I figure it out

* Put in extremely expensive series deletion code for library scan.

* Have Genre and Tag update the DB immediately to avoid dup issues

* Taking a break

* Moving to a lock with People was successful. Need to apply to others.

* Refactored code for series level and tag and genre with new locking strategy.

* New scan loop works. Next up optimization

* Swapped out the Kavita log with svg for faster load

* Refactored metadata updates to occur when the series are being updated.

* Code cleanup

* Added a new type of generic message (Info) to inform the user.

* Code cleanup

* Implemented an optimization which prevents any I/O (other than an attribute lookup) for Library/Series Scan. This can bring a recently updated library on network storage (650 series) to fully process in 2 seconds.

Fixed a bug where File Analysis was running everytime for each non-epub file.

* Fixed ARM x64 builds not being able to view PDF cover images due to a bad update in DocNet.

* Some code cleanup

* Added experimental signalr update code to have a more natural refresh of library-detail page

* Hooked in ability to send new series events to UI

* Moved all scan (file scan only) tasks into Scan Queue. Made it so scheduled ScanLibraries will now check if any existing task is being run and reschedule for 3 hours, and 10 mins for scan series.

* Implemented the info event in the events widget and added a clear all button to dismiss all infos and errors.  Added --event-widget-info-bg-color

* Remove --drawer-background-color since it's not used

* When new series added, inject directly into the view.

* Some debug code cleanup

* Fixed up the unit tests

* Ensure all config directories exist on startup

* Disabled Library Watching (that will go in next build)

* Ensure update for series is admin only

* Lots of code changes, scan series kinda works, specials are splitting, optimizations are failing. Demotivated on this work again.

* Removed SeriesFolder migration

* Added the SeriesFolder migration

* Added a new pipe for dates so we can provide some nicer defaults. Added folder path to the series detail.

* The scan optimizations now work for NTFS systems.

* Removed a TODO

* Migrated all the times to use DateTime.Now and not Utc.

* Refactored some repo calls to use the includes flag pattern

* Implemented a check for the library scan optimization check to validate if the library was updated (type change, library rename, folder change, or series deleted) and let the optimization be bypassed.

* Added another optimization which will use just folder attribute of last write time if the drive is not NTFS.

* Fixed a unit test

* Some code cleanup

* Bump versions by dotnet-bump-version.

* Misc UI Fixes (#1450)

* Fixed collection cover images not rendering

* added a try/catch on sending email, so we fail silently if it doesn't send.

* Fixed Go Back not returning to last scroll position due to layoutmode change resetting, despite nothing changing.

* Fixed a bug where when turning between pages on default mode, the height calculations could get skewed.

* Fixed a missing case for card item where it wouldn't show tooltip title for series.

* Bump versions by dotnet-bump-version.

* New Scan Loop Fixes (#1452)

* Refactored ScanSeries to avoid a lot of extra work and fixed a bug where Scan Series would invoke the processing twice.

Refactored the series selection code during process such that we use Localized Name as well, for cases where the original name was changed.

Undid an optimization around Last Write time, since Linux file systems match how NTFS works.

* Fixed part of the query

* Added a NormalizedLocalizedName for quick searching in which a series needs grouping. Reworked scan loop code a bit to ensure we don't do extra work.

Tweaked the widget logic to help display better and not show "Nothing going on here".

* Fixed a bug where archives with ._ files would be counted as valid files, while they are actually just metadata files on Mac's.

* Fixed a broken unit test

* Bump versions by dotnet-bump-version.

* Simplify parent lookup with Directory.GetParent (#1455)

* Simplify parent lookup with Directory.GetParent

* Address comments

* Bump versions by dotnet-bump-version.

* Scan Loop Fixes (#1459)

* Added Last Folder Scanned time to series info modal.

Tweaked the info event detail modal to have a primary and thus be auto-dismissable

* Added an error event when multiple series are found in processing a series.

* Fixed a bug where a series could get stuck with other series due to a bad select query.

Started adding the force flag hook for the UI and designing the confirm.

Confirm service now also has ability to hide the close button.

Updated error events and logging in the loop, to be more informative

* Fixed a bug where confirm service wasn't showing the proper body content.

* Hooked up force scan series

* refresh metadata now has force update

* Fixed up the messaging with the prompt on scan, hooked it up properly in the scan library to avoid the check if the whole library needs to even be scanned. Fixed a bug where NormalizedLocalizedName wasn't being calculated on new entities.

Started adding unit tests for this problematic repo method.

* Fixed a bug where we updated NormalizedLocalizedName before we set it.

* Send an info to the UI when series are spread between multiple library level folders.

* Added some logger output when there are no files found in a folder. Return early if there are no files found, so we can avoid some small loops of code.

* Fixed an issue where multiple series in a folder with localized series would cause unintended grouping. This is not supported and hence we will warn them and allow the bad grouping.

* Added a case where scan series fails due to the folder being removed. We will now log an error

* Normalize paths when finding the highest directory till root.

* Fixed an issue with Scan Series where changing a series' folder to a different path but the original series folder existed with another series in it, would cause the series to not be deleted.

* Fixed some bugs around specials causing a series merge issue on scan series.

* Removed a bug marker

* Cleaned up some of the scan loop and removed a test I don't need.

* Remove any prompts for force flow, it doesn't work well. Leave the API as is though.

* Fixed up a check for duplicate ScanLibrary calls

* Bump versions by dotnet-bump-version.

* Scroll Resume (#1460)

* When we navigate from a page then back, resume back on the last scroll key (if clicked)

* Resume jump key position when navigating back to a page. Removed some extra blank space on collection detail when a collection doesn't have a summary or cover image.

* Ignore progress events on series cards

* Added a url to swagger for /, which could be reverse proxy url

* Bump versions by dotnet-bump-version.

* Misc UI fixes (#1461)

* Misc fixes

- Fixed modal being stretched when not needed.
- Fixed Logo vertical align
- Fixed drawer content scroll, and from it being squished due to overridden by bootstrap.

* series detail cover image stretch fix

- Fixes: Fixes series detail cover image being stretched on larger resolutions

* fixing empty lists scrollbar

* Fixing want to read error

* fixing unnecessary scrollbar

* Fixing recently updated tooltip

* Bump versions by dotnet-bump-version.

* Folder Watching (#1467)

* Hooked in a server setting to enable/disable folder watching

* Validated the file rename change event

* Validated delete file works

* Tweaked some logic to determine if a change occurs on a folder or a file.

* Added a note for an upcoming branch

* Some minor changes in the loop that just shift where code runs.

* Implemented ScanFolder api

* Ensure we restart watchers when we modify a library folder.

* Fixed a unit test

* Bump versions by dotnet-bump-version.

* More Scan Loop Bugfixes (#1471)

* Updated scan time for watcher to 30 seconds for non-dev. Moved ScanFolder off the Scan queue as it doesn't need to be there. Updated loggers

* Fixed jumpbar missing

* Tweaked the messaging for CoverGen

* When we return early due to nothing being done on library and series scan, make sure we kick off other tasks that need to occur.

* Fixed a foreign constraint issue on Volumes when we were adding to a new series.

* Fixed a case where when picking normalized series, capitalization differences wouldn't stack when they should.

* Reduced the logging output on dev and prod settings.

* Fixed a bug in the code that finds the highest directory from a file, where we were not checking against a normalized path.

* Cleaned up some code

* Fixed broken unit tests

* Bump versions by dotnet-bump-version.

* More Scan Loop Fixes (#1473)

* Added a ToList() to avoid a bug where a person could be removed from a list while iterating over the list.

* When deleting a series, want to read page will now automatically remove that series from the view.

* Fixed a series lookup which was ignoring format

* Ignore XML comment warnings

* Removed a note since it was already working that way

* Fixed unit test

* Bump versions by dotnet-bump-version.

* Misc UI Fixes (#1477)

* Tweaked a Migration to log correctly only if something is going to be done.

* Refactored Reading List Controller code into a dedicated service and cleaned up some methods that aren't needed anymore.

* Fixed a bug where adding a new item to a reading list wasn't adding it at the end.

* Fixed an issue where collection page would re-render the same covers on multiple items.

* Fixed a missing margin-top which made the page extras drawer not render correctly and hence unclosable on small screens.

* Added some timeout on manage users screen to give data time to flush.

Added a dedicated token log for account flows, in case url encoding plays a part (but from testing it doesn't).

* Reverted back to building for ES6 instead of es2020 for old Safari 12.5.5 browsers (10MB difference in build size).

* Cleaned up the logic in removing series not found during scan loop.

* Tweaked the timings for Library Watcher to 1 min and reprocess queue every 30 seconds.

* Bump versions by dotnet-bump-version.

* Added fixes for libvips (#1479)

* Bump versions by dotnet-bump-version.

* Tachiyomi + Fixes (#1481)

* Fixed a bootstrap bug

* Fixed repeating images on collection detail

* Fixed up some logic in library watcher which wasn't processing all of the queue.

* When parsing non-epubs in Book library, use Manga parsing for Volume support to better support Light Novels

* Fixed some bugs with the tachiyomi plugin api's for progress tracking

* Bump versions by dotnet-bump-version.

* Adding Health controller (#1480)

* Adding Health controller

- Added: Added API endpoint for a health check to streamline docker healthy status.

* review comment fixes

* Bump versions by dotnet-bump-version.

* Simplify Folder Watcher (#1484)

* Refactored Library Watcher to use Hangfire under the hood.

* Support .kavitaignore at root level.

* Refactored a lot of the library watching code to process faster and handle when FileSystemWatcher runs out of internal buffer space. It's still not perfect, but good enough for basic use.

* Make folder watching as experimental and default it to off by default.

* Revert #1479

* Tweaked the messaging for OPDS to remove a note about download role.

Moved some code closer to where it's used.

* Cleaned up how the events widget reports

* Fixed a null issue when deleting series in the UI

* Cleaned up some debug code

* Added more information for when we skip a scan

* Cleaned up some logging messages in CoverGen tasks

* More log message tweaks

* Added some debug to help identify a rare issue

* Fixed a bug where save bookmarks as webp could get reset to false when saving other server settings

* Updated some documentation on library watcher.

* Make LibraryWatcher fire every 5 mins

* Bump versions by dotnet-bump-version.

* Sort series by chapter number only when some chapters have no volume (#1487)

* Sort series by chapter number only when some chapters have no volume information

* Implement a Default static instance of ChapterSortComparer

* Further use Default static Comparers

* Add missing ToLit() as per comments

* SQLite Hangfire  (#1488)

* Update to use SQLIte for Hangfire to retain information on tasks

* Updated all external links to have noopener noreferrer

* When watching folders, ensure the folders exist before creating watchers.

* Tweaked the messaging for Email Service and added link to the project.

* Bump versions by dotnet-bump-version.

* Bump versions by dotnet-bump-version.

* Fixed typeahead not working correctly (#1490)

* Bump versions by dotnet-bump-version.

* Release Testing Day 1 (#1491)

* Fixed a bug where typeahead wouldn't automatically show results on relationship screen without an additional click.

* Tweaked the code which checks if a modification occured to check on seconds rather than minutes

* Clear cache will now clear temp/ directory as well.

* Fixed an issue where Chrome was caching api responses when it shouldn't had.

* Added a cleanup temp code

* Ensure genres get removed during series scan when removed from metadata.

* Fixed a bug where all epubs with a volume would show as Volume 0 in reading list

* When a scan is in progress, don't let the user delete the library.

* Bump versions by dotnet-bump-version.

* Scan Loop Last Write Time Change (#1492)

* Refactored invite user flow to separate error handling on create user flow and email flow. This should help users that have unique situations.

* Switch to using files to check LastWriteTime. Debug code in for Robbie to test on rclone

* Updated Parser namespace. Changed the LastWriteTime to check all files and folders.

* Bump versions by dotnet-bump-version.

* Release Testing Day 2 (#1493)

* Added a no data section to collection detail.

* Remove an optimization for skipping the whole library scan as it wasn't reliable

* When resetting password, ensure the input is colored correctly

* Fixed setting new password after resetting, throwing an error despite it actually being successful.

Fixed incorrect messaging for Password Reset page.

* Fixed a bug where reset password would show the side nav button and skew the page.

Updated a lot of references to use Typed version for formcontrols.

* Removed a migration from 0.5.0, 6 releases ago.

* Added a null check so we don't throw an exception when connecting with signalR on unauthenticated users.

* Bump versions by dotnet-bump-version.

* Fixed a bug where a series with a relationship couldn't be deleted. (#1495)

* Bump versions by dotnet-bump-version.

* Release Testing Day 3 (#1496)

* Tweaked log messaging for library scan when no files were scanned.

* When a theme that is set gets removed due to a scan, inform the user to refresh.

* Fixed a typo and make Darkness -> Brightness

* Make download theme files allowed to be invoked by non-authenticated users, to allow new users to get the default theme.

* Hide all series side nav item if there are no libraries exposed to the user

* Fixed an API for Tachiyomi when syncing progress

* Fixed dashboard not responding to Series Removed and Added events.

Ensure we send SeriesRemoved events when they are deleted.

* Reverted Hangfire SQLite due to aborted jobs being resumed, when they shouldnt. Fixed some scan loop issues where cover gen wouldn't be invoked always on new libraries.

* Bump versions by dotnet-bump-version.

* Updating series detail cover style (#1498)

# FIxed
- Fixed: Fixed an issue with series detail cover when scaled down.

* Bump versions by dotnet-bump-version.

* v0.5.6 Release (#1499)

* Bump versions by dotnet-bump-version.

* Bookmark RBS + Dynamic PGO (#1503)

* Allow .NET to optimize code as it's running.

* Implemented the ability to restrict users Bookmark ability. By default, users will need to now opt-in to get bookmark roles.

* Fixed a tachiyomi progress syncing logic bug

* Bump versions by dotnet-bump-version.

* Updating series detail cover (#1509)

* Updating series detail cover

# Fixed
- Fixed: Fixed an issue where the series detail cover would resize too large on ultra wide displays.

* Fixing typos

* Bump versions by dotnet-bump-version.

* Logging Enhancements (#1521)

* Recreated Kavita Logging with Serilog instead of Default. This needs to be move out of the appsettings now, to allow auto updater to patch.

* Refactored the code to be completely configured via Code rather than appsettings.json. This is a required step for Auto Updating.

* Added in the ability to send logs directly to the UI only for users on the log route. Stopping implementation as Alerts page will handle the rest of the implementation.

* Fixed up the backup service to not rely on Config from appsettings.json

* Tweaked the Logging levels available

* Moved everything over to File-scoped namespaces

* Moved everything over to File-scoped namespaces

* Code cleanup, removed an old migration and changed so debug logging doesn't print sensitive db data

* Removed dead code

* Bump versions by dotnet-bump-version.

* Misc Enhancements (#1525)

* Moved the data connection for the Database out of appsettings.json and hardcoded it. This will allow for more customization and cleaner update process.

* Removed unneeded code

* Updated pdf viewer to 15.0.0 (pdf 2.6), which now supports east-asian fonts

* Fixed up some regex parsing for volumes that have a float number.

* Fixed a bug where the tooltip for Publication Status wouldn't show

* Fixed some weird parsing rules where v1.1 would parse as volume 1 chapter 1

* Fixed a bug where bookmarking button was hidden for admins without bookmark role (due to migration)

* Unified the star rating component in series detail to match metadata filter.

* Fixed a bug in the bulk selection code when using shift selection, where the inverse of what was selected would be toggled.

* Fixed some old code where if on all series page, only English as a language would return. We now return all languages of all libraries.

* Updated api/metadata/languages documentation

* Refactored some bookmark api names: get-bookmarks -> chapter-bookmarks, get-all-bookmarks -> all-bookmarks, get-series-bookmarks -> series-bookmarks, etc.

* Refactored all cases of createSeriesFilter to filterUtiltityService.

Added ability to search for a series on Bookmarks page.

Fixed a bug where people filters wouldn't respect the disable flag froms ettings.

* Cleaned up a bit of the circular downloader code.

* Implemented Russian Parsing

* Fixed an issue where some users that had a missing theme entry wouldn't be able to update their user preferences.

* Refactored normalization to exclude !, thus allowing series with ! to be different from each other.

* Fixed a migration exit case

* Fixed broken unit test

* Bump versions by dotnet-bump-version.

* Fixed a version issue with migration (#1526)

* Bump versions by dotnet-bump-version.

* Metadata Bugfixes (#1511)

* Fix XML deserialization of empty elements to integers

* Fix assumption that environment uses US time format

* Use series name as SeriesSort in epub

* Address some PR comments

* Add partial Equals(0 implementation to ComicInfo

* Update ComicInfo unittest. Revert previous version

* Bump versions by dotnet-bump-version.

* Configure Animation Module (#1504)

* Configure Animation Module

Configure the Animation Module of Angular to disable animation on older iOS devices (<14) where it causes animate not defined errors.

* Simplified disableAnimations

Removed the regex iOS version check as it seemed to return false on iOS 12.5.5 meaning that the `!('animate' in document.documentElement)` did the job already. This also allows users to enable the experimental feature Web Animations on iOS 12.5.5 to have them enabled again.

as note; navigator.userAgent returned the following on an iPad iOS 12.5.5
`Mozilla/5.0 (iPad; CPU OS 12_5_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Mobile/15E148 Safari/604.1`

* added console output on disabled

Added console.error if Web Animations have been disabled due to the browser not supporting this.

* Bump versions by dotnet-bump-version.

* Reader Bugs + New Features  (#1536)

* Updated a typo in manage tasks of Reoccuring -> Recurring

* Fixed a bug in MinimumNumberFromRange where a regex wasn't properly constructed which could skew results.

* Fixed a bug where Volume numbers that were a float wouldn't render correctly in the manga reader menu.

* Added the ability to double click on the image to bookmark it. Optimized the bookmark and unbookmark flows to remove 2 DB calls and reworked some flow of calls to speed it up.

Fixed some logic where when using double (manga) flow, both of the images wouldn't show the bookmark effect, despite both of them being saved. Likewise, fixed a bug where both images weren't updating UI state, so switching from double (manga) to single, the second image wouldn't show as bookmarked without a refresh.

* Double click works perfectly for bookmarking

* Collection cover image chooser will now prompt with all series covers by default.

Reset button is now moved up to the first slot if applicable.

* When a Completed series is fully read by a user, a nightly task will now remove that series from their Want to Read list.

* Added ability to trigger Want to Read cleanup from Tasks page.

* Moved the brightness readout to the label line and fixed a bootstrap migration bug where small buttons weren't actually small.

* Implemented ability to filter against release year (min or max or both).

* Fixed a log message that wasn't properly formatted when scan finished an no files changes.

* Cleaned up some code and merged some methods

* Implemented sort by Release year metadata filter.

* Fixed the code that finds ComicInfo.xml inside archives to only check the root and check explicitly for casing, so it must be ComicInfo.xml.

* Dependency updates

* Refactored some strings into consts and used TriggerJob rather than just enqueuing

* Fixed the prefetcher which wasn't properly loading in the correct order as it was designed.

* Cleaned up all traces of CircularArray from MangaReader

* Removed a debug code

* Fixed a bug with webtoon reader in fullscreen mode where continuous reader wouldn't trigger

* When cleaning up series from users' want to read lists, include both completed and cancelled.

* Fixed a bug where small images wouldn't have the pagination area extend to the bottom on manga reader

* Added a new method for hashing during prod builds and ensure we always use aot

* Fixed a bug where the save button wouldn't enable when color change occured.

* Cleaned up some issues in one of contributor's PR.

* Bump versions by dotnet-bump-version.

* Misc Polish and Fixes (#1542)

* Moved LibraryWatcher to utilize a queue for calculating the change event to ensure the Watcher doesn't get overwhelmed on large moves.

* Fixed a security vulnerability (https://huntr.dev/bounties/8a3e652f-d6bf-436e-877e-0eaf5c69ef95/). This will be disclosed in Stable release changelog.

* Tweaked the log message template

* Removed some dead code from Configuration json patcher

* Fixed a bug with the ComicInfo finding to properly handle root level.

Fixed a bug where sometimes scanner wouldn't choose the first file with ComicInfo for filling out information.

* Added new setting for managing how many logs files are allowed, just like how backups work.

* Added unit tests for new CleanupLogs code

* Fixed a bug where manga reader background color wasn't actually sending from the UI

* Added new stats for tracking to help understand usage in the app and what features are used or not.

* Fixed Stats url

* Fixed a bug where volumes that had larger than 1 difference wouldn't properly return next/prev chapter (for continuous reader)

* Remove a redundant test step in build pipeline, since it's already done at PR stage.

* Updated dockerfile to use the new Heath check endpoint

* Allow force to pass through to scan loop

* Removed some old config stuff from a safety check on config in entrypoint.sh

* Fixed broken unit tests due to new RBS check and how we setup mock data.

* Bump versions by dotnet-bump-version.

* Removed some debug code (#1543)

* Bump versions by dotnet-bump-version.

* Parser optimization part1 (#1531)

* Optimize CleanTitle

* Optimize MangaEditionRegex

* Optimize special regexes

* Refactor manga|comic special parsing into simple tests

* Word bind the special regexps. Support additional "special" use cases.

* Updates to address PR comments

* CleanTitle benchmarking

* Use a smaller Comics Data set for benchmarking

* Bump versions by dotnet-bump-version.

* Tachiyomi unit tests and fixes (#1549)

* Moved logic from TachiyomiController.cs to TachiyomiService.cs

* Added GetLatestChapter Unit Tests

* Tachiyomi more tests.
Implemented test for yearly volumes

* MarkVolumesUntilAsRead unit test

* Registered tachiyomi service.
Added new test

* Fixed test pages

* Added missing check if its single-file volume

* Removed dead code

* Added method documentation and breaked thousands with `_`

* Review details and renamed test method to be more descriptive

* Review changes
- Removed automapper
- Added spaces after commas
- Added class documentation (copied from controller)
- Made Culture static
- Added 'R' doc linking to docs.ms
- Added trycatch to service when saving progress and logged
- Removed redundant qualifiers

* finishing touches

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

* Bump versions by dotnet-bump-version.

* Folder Watching Polish + Epub Fix (#1550)

* Fixed entrypoint writing bad json (from develop)

* Fixed a bug where log file could write out a crap ton of information (serializing Series object) when a db error occurs.

* Fixed an issue with scan loop where concurrency issues could occur on new series being added.

* Tweaked the logger to suppress some noisy logs when using Debug log level.

* Fixed a regression with epub parsing from v3.2 of Vers-One's release

* Fixed up folder watching to work more reliable. Validated in production.

* Code cleanup

* Bump versions by dotnet-bump-version.

* Fallback to other locations when ComicInfo.xml not at root of archive (#1551)

* Fallback to other locations when ComicInfo.xml not at root of archive

* Better ComicInfo test coverage and benchmarks

* Add a rar archive to the ComicInfo test cases

* Bump versions by dotnet-bump-version.

* Series title word wrapping (#1519)

* Added text-break class to series title.

Simply added the class text-break from bootstrap to break on words.
https://getbootstrap.com/docs/5.0/utilities/text/#word-break

This has no issue with languages that do not or rarely use spaces, such as japanese and chinese. Used the following two series names to test;
- 今まで一度も女扱いされたことがない女騎士を女扱いする漫画
- Imamade Ichido mo Onnaatsukai sareta Koto ga Nai Onna Kishi wo Onnaatsukai suru

* Added text-break class to localized title

Also added the text-break bootstrap class to the localized title, removed the word-break rule from css as it is redundant.

* Enclosed LibraryName with span

Enclosed {{libraryName}} with a span to remove the added space before the title, aligning it again with the start of the subtitle. This mimics series-detail-component.html

* Bump versions by dotnet-bump-version.

* Nested Menus (#1554)

* added initial submenu

* added submenu - needs a bit of more work

* removed admin and nonadmin action split

* the whole menu is build under the resetactions function

* removed download from seriesAction

* changed submenu layout
changed submenu toggle icon
fix for the hovering of submenu toggle

* moved the cdMarkForCheck in the subscribe block

* Bump versions by dotnet-bump-version.

* Send To Device Support (#1557)

* Tweaked the logging output

* Started implementing some basic idea for devices

* Updated Email Service with new API routes

* Implemented basic DB structure and some APIs to prep for the UI and flows.

* Added an abstract class to make Unit testing easier.

* Removed dependency we don't need

* Updated the UI to be able to show devices and add new devices. Email field will update the platform if the user hasn't interacted with it already.

* Added ability to delete a device as well

* Basic ability to send files to devices works

* Refactored Action code to pass ActionItem back and allow for dynamic children based on an Observable (api).

Hooked in ability to send a chapter to a device. There is no logic in the FE to validate type.

* Fixed a broken unit test

* Implemented the ability to edit a device

* Code cleanup

* Fixed a bad success message

* Fixed broken unit test from updating mock layer

* Bump versions by dotnet-bump-version.

* Fixed a bug where when no devices, the submenu item would still render. (#1558)

* Bump versions by dotnet-bump-version.

* Extended Korean Filename Parsing Support (#1556)

* Added Some Korean Volume Matches

* Fixed Typo And Added Test Cases

* Restore Chapter Decimal Support

* Added Decimal Volume Support to -권, -화, -회 and -장
Merged -권 Pattern to -화, -회, -장 Pattern
Added Decimal Test to ParseVolumeTest

* Grouped Korean Tests

* Fixed Regexp Comment

* Bump versions by dotnet-bump-version.

* Disable Animations + Lots of bugfixes and Polish (#1561)

* Fixed inputs not showing inline validation due to a missing class

* Fixed some checks

* Increased the button size on manga reader (develop)

* Migrated a type cast to a pure pipe

* Sped up the check for if SendTo should render on the menu

* Don't allow user to bookmark in bookmark mode

* Fixed a bug where Scan Series would skip over Specials due to how new scan loop works.

* Fixed scroll to top button persisting when navigating between pages

* Edit Series modal now doesn't have a lock field for Series, which can't be locked as it is inheritently locked.

Added some validation to ensure Name and SortName are required.

* Fixed up some spacing

* Fixed actionable menu not opening submenu on mobile

* Cleaned up the layout of cover image on series detail

* Show all volume or chapters (if only one volume) for cover selection on series

* Don't open submenu to right if there is no space

* Fixed up cover image not allowing custom saves of existing series/chapter/volume images.

Fixed up logging so console output matches log file.

* Implemented the ability to turn off css transitions in the UI.

* Updated a note internally

* Code smells

* Added InstallId when pinging the email service to allow throughput tracking

* Bump versions by dotnet-bump-version.

* Auth Email Rework (#1567)

* Hooked up Send to for Series and volumes and fixed a bug where Email Service errors weren't propagating to the UI layer.

When performing actions on series detail, don't disable the button anymore.

* Added send to action to volumes

* Fixed a bug where .kavitaignore wasn't being applied at library root level

* Added a notification for when a device is being sent a file.

* Added a check in forgot password for users that do not have an email set or aren't confirmed.

* Added a new api for change email and moved change password directly into new Account tab (styling and logic needs testing)

* Save approx scroll position like with jump key, but on normal click of card.

* Implemented the ability to change your email address or set one. This requires a 2 step process using a confirmation token. This needs polishing and css.

* Removed an unused directive from codebase

* Fixed up some typos on publicly

* Updated query for Pending Invites to also check if the user account has not logged in at least once.

* Cleaned up the css for validate email change

* Hooked in an indicator to tell user that a user has an unconfirmed email

* Cleaned up code smells

* Bump versions by dotnet-bump-version.

* Misc Polish (#1569)

* Introduced a lock for DB work during the scan to hopefully reduce the concurrency issues

* Don't allow multiple theme scans to occur

* Fixed bulk actions not having all actions due to nested actionable menu changes

* Refactored the Scan loop to be synchronous to avoid any issues. After first loop, no real performance issues.

* Updated the LibraryWatcher when under many internal buffer full issues, to suspend watching for a full hour, to allow whatever downloading to complete.

* Removed Semaphore as it's not needed anymore

* Updated the output for logger to explicitly say from Kavita (if you're pushing to Seq)

* Fixed a broken test

* Fixed ReleaseYear not populating due to a change from a contributor around how to populate ReleaseYear.

* Ensure when scan folder runs, that we don't double enqueue the same tasks.

* Fixed user settings not loading the correct tab

* Changed the Release Year -> Release

* Added more refresh hooks in reader to hopefully ensure faster refreshes

* Reset images between chapter loads to help flush image faster. Don't show broken image icon when an image is still loading.

* Fixed the prefetcher not properly loading the correct images and hence, allowing a bit of lag between chapter loads.

* Code smells

* Bump versions by dotnet-bump-version.

* Scan Loop Fixes (#1572)

* Cleanup some messaging in the scan loop to be more context bearing

* Added Response Caching to Series Detail for 1 min, due to the heavy nature of the call.

* Refactored code to make it so that processing of series runs sync correctly.

Added a log to inform the user of corrupted volume from buggy code in v0.5.6.

* Moved folder watching out of experimental

* Fixed an issue where empty folders could break the scan loop

* Another fix for when dates aren't valid, the scanner wouldn't get the proper min and would throw an exception (develop)

* Implemented the ability to edit release year from the UI for a series.

* Added a unit test for some new logic

* Code smells

* Bump versions by dotnet-bump-version.

* Scan Loop Fortification (#1573)

* Cleanup some messaging in the scan loop to be more context bearing

* Added Response Caching to Series Detail for 1 min, due to the heavy nature of the call.

* Refactored code to make it so that processing of series runs sync correctly.

Added a log to inform the user of corrupted volume from buggy code in v0.5.6.

* Moved folder watching out of experimental

* Fixed an issue where empty folders could break the scan loop

* Another fix for when dates aren't valid, the scanner wouldn't get the proper min and would throw an exception (develop)

* Implemented the ability to edit release year from the UI for a series.

* Added a unit test for some new logic

* Code smells

* Rewrote the handler for suspending watching to be more resilient and ensure no two threads have a race condition.

* More error handling for when a ScanFolder is invoked but multiple series belong to that folder, log it to the user and default to a library scan.

* ScanSeries now will check for kavitaignores higher than it's own folder and respect library level.

* Fixed an issue where image series with a folder name containing the word "folder" could get ignored as it thought the image was a cover image.

When a series folder is moved or deleted, skip parent ignore finding.

* Removed some old files, added in scanFolder a check if the series found for a folder is in a book library and if so to always do a library scan (as books are often nested into one folder with  multiple series). Added some unit tests

* Refactored some scan loop logic into ComicInfo, wrote tests and updated some documentation to make the fields more clear.

* Added a test for GetLastWriteTime based on recent bug

* Cleaned up some redundant code

* Fixed a bad merge

* Code smells

* Removed a package that's no longer used.

* Ensure we check against ScanQueue on ScanFolder enqueuing

* Documentation and more bullet proofing to ensure Hangfire checks work more as expected

* Bump versions by dotnet-bump-version.

* Restricted Profiles (#1581)

* Added ReadingList age rating from all series and started on some unit tests for the new flows.

* Wrote more unit tests for Reading Lists

* Added ability to restrict user accounts to a given age rating via admin edit user modal and invite user. This commit contains all basic code, but no query modifications.

* When updating a reading list's title via UI, explicitly check if there is an existing RL with the same title.

* Refactored Reading List calculation to work properly in the flows it's invoked from.

* Cleaned up an unused method

* Promoted Collections no longer show tags where a Series exists within them that is above the user's age rating.

* Collection search now respects age restrictions

* Series Detail page now checks if the user has explicit access (as a user might bypass with direct url access)

* Hooked up age restriction for dashboard activity streams.

* Refactored some methods from Series Controller and Library Controller to a new Search Controller to keep things organized

* Updated Search to respect age restrictions

* Refactored all the Age Restriction queries to extensions

* Related Series no longer show up if they are out of the age restriction

* Fixed a bad mapping for the update age restriction api

* Fixed a UI state change after updating age restriction

* Fixed unit test

* Added a migration for reading lists

* Code cleanup

* Bump versions by dotnet-bump-version.

* Misc Bugfixes (#1582)

* Fixed a bug with RBS on non-admin accounts

* Fixed a bug where get next/prev chapter wouldn't respect floating point volume numbers

* Fixed a bad migration version check

* When building kavita ignore exclusions, ignore blank lines.

* Hooked up the GetFullSeriesByAnyName to check against OriginalName exactly

* Refactored some code for building ignore from library root, to keep the code cleaner

* Tweaked some messaging

* Fixed a bad directory join when a change event occurs in a nested series folder.

* Fixed a bug where cover generation would prioritize a special if there were only chapters in the series.

* Fixed a bug where you couldn't update a series modal if there wasn't a release year present

* Fixed an issue where renaming the Series in Kavita wouldn't allow ScanSeries to see the files, and thus would delete the Series.

* Added an additional check with Hangfire to make sure ScanFolder doesn't kick off a change when a bunch of changes come through for the same directory, but a job is already running.

* Added more documentation

* Migrated more response caching to profiles and merged 2 apis into one, since they do the same thing.

* Fixed a bug where NotApplicable age ratings were breaking Recently Updated Series

* Cleaned up some cache profiles

* More caching

* Provide response caching on Get Next/Prev Chapter

* Code smells

* Bump versions by dotnet-bump-version.

* New Series Relation - Edition (#1583)

* Moved UpdateRelatedSeries from controller to SeriesService.cs

* Added 2 tests.
- UpdateRelatedSeries_ShouldDeletePrequelRelation
- UpdateRelatedSeries_ShouldNotAllowDuplicates

* Some docs and codestyle nitpicks

* Simplified tests and made easier to read

* Added 'Editions' series relation

* Missing code to properly show the relations in the UI

* Create Service for GetRelatedServices

* Added unit test. Assert Edition, Prequel and Sequel do not return parent while others do

* fixed missing userRating

* Add requested changes:
- Rename one test
- Split one test into two tests

* Bump versions by dotnet-bump-version.

* Release Polish (#1586)

* Fixed a scaling issue in the epub reader, where images could scale when they shouldn't.

* Removed some caching on library/ api and added more output for a foreign key constraint

* Hooked in Restricted Profile stat collection

* Added a new boolean on age restrictions to explicitly allow unknowns or not. Since unknown is the default state of metadata, if users are allowed access to Unknown, age restricted content could leak.

* Fixed a bug where sometimes series cover generation could fail under conditions where only specials existed.

* Fixed foreign constraint issue when cleaning up series not seen at end of scan loop

* Removed an additional epub parse when scanning and handled merging differently

* Code smell

* Bump versions by dotnet-bump-version.

* Release Shakeout Day 1 (#1591)

* Fixed an issue where reading list were not able to update their summary due to a duplicate title check.

* Misc code smell cleanup

* Updated .net dependencies and removed unneeded ones

* Fixed an issue where removing a series from want to read list page wouldn't update the page correctly

* Fixed age restriction not applied to Recommended page

* Ensure that Genres and Tags are age restricted gated

* Persons are now age gated as well

* When you choose a cover, the new cover will properly be selected and will focus on it, in the cases there are many other covers available.

* Fixed caching profiles

* Added in a special hook when deleting a library to clear all series Relations before we delete

* Bump versions by dotnet-bump-version.

* Release Shakeout Day 2 (#1594)

* Fixed a bad color on the PWA titlebar

* Added more unit tests, cleaned up some dead code, and made it so when age restriction is Not Applicable, the Unknowns field disables

* Don't show an empty menu when user has no permissions

* Fixed deleting a library with relation causing library deleting to fail

* Consolidated some includes code into one method for Series Repo

* Small fixes

* Bump versions by dotnet-bump-version.

* Release Shakeout 3 (#1597)

* Fixed a bug where bulk selection on series detail wouldn't allow you to select the whole card, only the checkbox.

* Refactored the implementation of MarkChaptersAsRead to streamline it.

* Fixed a bug where volume cards weren't properly updating their read state based on events from backend.

* Added [ScannerService] to more loggers

* Fixed invite user flow

* Fixed broken edit user flow

* Fixed calling device service on unauthenticated screens causing redirection

* Fixed reset password via email not working when success message was sent back

* Fixed broken white theme on book reader

* Small tweaks to white theme

* More fixes

* Adjusted AutomaticRetries

* Bump versions by dotnet-bump-version.

* UI Polish (#1599)

* Make the positioning of "Library | Recommended" consistent

* Fix reading lists not navigating back to their library after deletion

* Bump versions by dotnet-bump-version.

* Release Shakeout 4 (#1600)

* Fixed a bug where bulk selection on series detail wouldn't allow you to select the whole card, only the checkbox.

* Refactored the implementation of MarkChaptersAsRead to streamline it.

* Fixed a bug where volume cards weren't properly updating their read state based on events from backend.

* Added [ScannerService] to more loggers

* Fixed invite user flow

* Fixed broken edit user flow

* Fixed calling device service on unauthenticated screens causing redirection

* Fixed reset password via email not working when success message was sent back

* Fixed broken white theme on book reader

* Small tweaks to white theme

* More fixes

* Adjusted AutomaticRetries

* When an auth change occures, reset the devices in service so devices don't leak between profiles

* Fixed a bug where sendTo for series wasn't properly taking into account specials (on series detail page)

* Drop down how long series detail caches for to prevent signalr updates from refreshing the UI

* Close submenus when hovering over other items, not just other submenus

* Fixed a bug where scanning for themes would always report theme didn't exist

* Added Hangfire.db back in

* Fixed a bad build

* Bump versions by dotnet-bump-version.

* Fixed column layout on multiple components for the user settings (#1602)

#Fixed
- Fixed: Fixed an issue where the controls would extend outside of the container on the user account preferences page.

* Bump versions by dotnet-bump-version.

* v0.6 Release (#1603)

Co-authored-by: tjarls <tjarls@gmail.com>
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
Co-authored-by: Chris Plaatjes <kizaing@gmail.com>
Co-authored-by: Ocgineer <rvanbeek1@gmail.com>
Co-authored-by: ThePromidius <thepromidiusyt@gmail.com>
Co-authored-by: Korakot Santiudommongkol <47130579+KorakotSanti@users.noreply.github.com>
Co-authored-by: DeltaLaboratory <delta@deltalab.dev>
Co-authored-by: TheIceCreamTroll <33820904+TheIceCreamTroll@users.noreply.github.com>
2022-10-22 09:34:20 -07:00
Joseph Milazzo
1ee6c3e506
Fixed access issues around new Authorize scheme. (#1417) 2022-08-08 15:00:10 -07:00
Joseph Milazzo
c650436f57
Misc Bugfixes (#1378)
* Fixed an issue where sometimes when loading the next page, the pagination area wouldn't be properly setup due to a missed rendering cycle

* Refactored BookController to thin it out and refactor some of the functions to apply IOC. Added some split query statements on a few queries.

* Added Split Query to many queries

* Added a visual indicator for loading state of PDF. Will spruce up css later.

* Added back in logic

* Fixed flash of white when refreshing browser

* Hooked in a loading progress bar for the pdf reader

* Close the pdf reader when pressing ESC
2022-07-17 07:19:36 -07:00
Joseph Milazzo
af4f35da5b
Better Caching & Global Downloads (#1372)
* Fixed a bug where cache TTL was using a field which always was 0.

* Updated Scan Series task (from UI) to always re-calculate what's on file and not rely on last update. This leads to more reliable results, despite extra overhead.

* Added image range processing on images for the reader, for slower networks or large files

* On manga (single) try to use prefetched image, rather than re-requesting an image on pagination

* Reduced some more latency when rendering first page of next chapter via continuous reading mode

* Fixed a bug where metadata filter, after updating a typeahead, collapsing filter area then re-opening, the filter would still be applied, but the typeahead wouldn't show the modification.

* Coded an idea around download reporting, commiting for history, might not go with it.

* Refactored the download indicator into it's own component. Cleaning up some code for download within card component

* Another throw away commit. Put in some temp code, not working but not sure if I'm ditching entirely.

* Updated download service to enable range processing (so downloads can resume) and to reduce re-zipping if we've just downloaded something.

* Refactored events widget download indicator to the correct design. I will be moving forward with this new functionality.

* Added Required fields to ProgressDTO

* Cleaned up the event widget and updated existing download progress to indicate preparing the download, rather than the download itself.

* Updated dependencies for security alerts

* Refactored all download code to be streamlined and globally handled

* Updated ScanSeries to find the highest folder path before library, not just within the files. This could lead to scan series missing files due to nested folders on same parent level.

* Updated the caching code to use a builtin annotation. Images are now caching correctly.

* Fixed a bad redirect on an auth guard

* Tweaked how long we allow cache for, as the cover update now doesn't work well.

* Fixed a bug on downloading bookmarks from multiple series, where it would just choose the first series id for the temp file.

* Added an extra check for downloading bookmarks

* UI Security updates, Fixed a bug on bookmark reader, the reader on last page would throw some errors and not show No Next Chapter toast.

* After scan, clear temp

* Code smells
2022-07-13 07:45:14 -07:00
Joseph Milazzo
2ab0aedd22
Swagger, Tachiyomi, and some new settings (#1331)
* Fixed up swagger generation

* Updated Tachiyomi's latest-chapter to hopefully solve some sync issues.

* Fixed #1279 with table of contents due to new EPubReader

* When errors occur, show the event widget icon in red

* Lots of documentation added and tweaked some wording around backups and swagger

* For promidius

* Return proper ChapterDTO

* Hacks for Promidius

* Cleanup code

* No loose leaf, send max chapter

* One more encode change

* Implemented code per promiduius' requirements

* Fixed a bug in the epub parsing where even if you had a series index and series group, but didn't have the series in the title, Kavita wouldn't group them properly.

* Removed some extra comment

* Implemented the ability to change a library's type after it's been setup. This displays a warning explaining the dangers of it.

* Removed some whitespace

* Blur descriptions based on read status for list item view to avoid spoilers

* Tweaked placement of a tooltip due to new series detail styles

* Hooked up a user preference for bluring unread summaries. Fixed a bug in refresh token where we would cause re-authentication when it shouldn't be needed.
2022-06-25 15:52:21 -07:00
Joseph Milazzo
3ab3a10ae7
New PDF Reader (#1324)
* Refactored all the code that opens the reader to use a unified function. Added new library and setup basic pdf reader route.

* Progress saving is implemented. Targeting ES6 now.

* Customized the toolbar to remove things we don't want, made the download button download with correct filename. Adjusted zoom setting to work well on first load regardless of device.

* Stream the pdf file to the UI rather than handling the download ourselves.

* Started implementing a custom toolbar.

* Fixed up the jump bar calculations

* Fixed filtering being broken

* Pushing up for Robbie to cleanup the toolbar layout

* Added an additional button. Working on logic while robbie takes styling

* Tried to fix the code for robbie

* Tweaks for fonts

* Added button for book mode, but doesn't seem to work after renderer is built

* Removed book mode

* Removed the old image caching code for pdfs as it's not needed with new reader

* Removed the interfaces to extract images from pdf.

* Fixed original pagination area not scaling correctly

* Integrated series remove events to library detail

* Cleaned up the getter naming convention

* Cleaned up some of the manga reader code to reduce cluter and improve re-use

* Implemented Japanese parser support for volume and chapters.

* Fixed a bug where resetting scroll in manga reader wasn't working

* Fixed a bug where word count grew on each scan.

* Removed unused variable

* Ensure we calculate word count on files with their own cache timestamp

* Adjusted size of reel headers

* Put some code in for moving on original image with keyboard, but it's not in use.

* Cleaned up the css for the pdf reader

* Cleaned up the code

* Tweaked the list item so we show scrollbar now when fully read
2022-06-15 14:43:32 -07:00
Joseph Milazzo
85f3b620af
Bugfix polishing (#1245)
* Fixed a bug where volumes that are a range fail to generate series detail

* Moved tags closer to genre instead of between different people

* Optimized the query for On Deck

* Adjusted mime types to map to cbX types instead of their generic compression methods.

* Added wiki documentation into invite user flow and register admin user to help users understand email isn't required and they can host their own service.

* Refactored the document height to be set and removed on nav service, so the book reader and manga reader aren't broken.

* Refactored On Deck to first be completely streamed to UI, without having to do any processing in memory. Rewrote the query so that we sort by progress then chapter added. Progress is 30 days inclusive, chapter added is 7 days.

* Fixed an issue where epub date parsing would sometimes fail when it's only a year or not a year at all

* Fixed a bug where incognito mode would report progress

* Fixed a bug where bulk selection in storyline tab wouldn't properly run the action on the correct chapters (if selecting from volume -> chapter).

* Removed a - 1 from total page from card progress bar as the original bug was fixed some time ago

* Fixed a bug where the logic for filtering out a progress event for current logged in user didn't check properly when user is logged out.

* When a file doesn't exist and we are trying to read, throw a kavita exception to the UI layer and log.

* Removed unneeded variable and added some jsdoc
2022-05-08 09:15:43 -07:00
Joseph Milazzo
1e51e39f66
Feature/misc (#1234)
* Fixed a bug where publication status could show as filled in when total number is 0 but there is a max count.

Add ComicInfo support for LocalizedSeries which will populate a Series LocalizedName.

Fixed an issue in tag constraint issues.

* Hooked in LocalizedSeries tag into merge step in scanner.

* Hooked in LocalizedSeries from ComicInfo into Kavita and also use it to help during merge phase to avoid 2 different series, if one file is using the name of the localized series.

* Reduced some extra string creation and updated epub library to ignore bad ToCs.

* Bumped dependencies to latest. When an epub doesn't have a dc:date with publication event type, default back to just a normal dc:date tag.

* Fixed a bug where webtoon reader would error out on first load due to how we passed the function to the reader

* Reverted the centering code
2022-04-28 14:50:31 -07:00
Joseph Milazzo
2b0d47d15e
Shakeout Testing Part 1 (#1052)
* Have language from epubs populate metadata

* series detail needs to reload the underlying volumes when scan event comes in, not just metadata.

* Added Id to chapter detail modal (for debugging)

* Implement IDisposable on applicable Unit Tests

* Removed unused using statements

* Fixed a bug where images would flash like crazy during a scan because the code to refresh the underlying image wasn't checking the entity type or Id.

* When filtering rating, only apply the filter to your account.

* Removed Disposable on tests
2022-02-09 16:59:14 -08:00
Joseph Milazzo
0e2fafe396
Took care of SonarCloud code issues (#1041) 2022-02-07 05:30:28 -08:00
Joseph Milazzo
19e17c85fa
Misc Fixes (#1031)
* Changed the default margin for mobile in book reader to 5%

* Fixed a bug where checking for update did no current version validation before sending the update to the UI.

* Added some documentation to the book code

* Changed token expiry to 2 weeks.

* Search bar will by default not have a border outline

* Cleaned up some styles for white mode hovering on search

* Added missing genre search group, reworked some clearing code, fixed click handlers

* Fixed genre property

* Changed the series title to show bookmarks and the edit button will now take you to series

* Fixed up accordion tabpanel color in dark mode

* Fixed a typo of CoverArtist instead of "Cover artist"

* Added some documentation changes

* Fixed a bug where sort options on All-Series wasn't working

* Added a thanks to Palace-Designs who hosts our infrastructure to the readme.

* Fixed a bug where duplicate people for the same role would be returned

* Fixed a bug where when user cleared out input manually, search would retain old search results
2022-02-04 11:28:58 -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
2b57449a63
Book Reader Issues (#906)
* Refactored the Font Escaping Regex with new unit tests.

* Fonts are now properly escaped, somehow a regression was introduced.

* Refactored most of the book page loading for the reader into the service.

* Fixed a bug where going into fullscreen in non dark mode will cause the background of the reader to go black. Fixed a rendering issue with margin left/right screwing html up. Fixed an issue where line-height: 100% would break book's css, now we remove the styles if they are non-valuable.

* Changed how I fixed the black mode in fullscreen

* Fixed an issue where anchors wouldn't be colored blue in white mode

* Fixed a bug in the code that checks if a filename is a cover where it would choose "backcover" as a cover, despite it not being a valid case.

* Validate if ReleaseYear is a valid year and if not, set it to 0 to disable it.

* Fixed an issue where some large images could blow out the screen when reading on mobile. Now images will force to be max of width of browser

* Put my hack back in for fullscreen putting background color to black

* Change forwarded headers from All to explicit names

* Fixed an issue where Scheme was not https when it should have been. Now the browser will handle which scheme to request.

* Cleaned up the user preferences to stack multiple controls onto one row

* Fixed fullscreen scroll issue with progress, but now sticky top is missing.

* Corrected the element on which we fullscreen
2022-01-07 06:56:28 -08:00
Joseph Milazzo
d2807253c3
Beefed up ToC generation to handle new ways of packing epub. (#840) 2021-12-08 12:19:58 -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
8e3121447d
More EPUB Scoping Fixes (#691)
* Added better handling around when importing css files that are empty. Moved comment removal on css files to before some css whitespace cleanup to get better matches.

* Some enhancements on the checks to see if we need the bottom action bar on reader. Now we don't query DOM and have something that works more reliably.
2021-10-19 06:12:49 -07:00
Joseph Milazzo
83f8e25478
Continuous Reading for Webtoons & I Just Couldn't Stop Coding (#574)
* Fixed an issue from perf tuning where I forgot to send Pages to frontend, breaking reader.

* Built out continuous reading for webtoon reader. Still has some issues with triggering.

* Refactored GetUserByUsernameAsync to have a new flavor and allow the caller to pass in bitwise flags for what to include. This has a get by username or id variant. Code is much cleaner and snappier as we avoid many extra joins when not needed.

* Cleanup old code from UserRepository.cs

* Refactored OPDS to use faster API lookups for User

* Refactored more code to be cleaner and faster.

* Refactored GetNext/Prev ChapterIds to ReaderService.

* Refactored Repository methods to their correct entity repos.

* Refactored DTOs and overall cleanup of the code.

* Added ability to press 'b' to bookmark a page

* On hitting last page, save progress forcing last page to be read. Adjusted logic for the top and bottom spacers for triggering next/prev chapter load

* When at top or moving between chapters, scrolling down then up will now trigger page load. Show a toastr to inform the user of a change in chapter (it can be really fast to switch)

* Cleaned up scroll code

* Fixed an issue where loading a chapter with last page bookmarked, we'd load lastpage - 1

* Fixed last page of webtoon reader not being resumed on loading said chapter due to a difference in how max page is handled between infinite scroller and manga reader.

* Removed some comments

* Book reader shouldn't look at left/right tap to paginate elems for position bookmarking. Missed a few areas for saving while in incognito mode

* Added a benchmark to test out a sort code

* Updated the read status on reading list to use same style as other places

* Refactored GetNextChapterId to bring the average response time from 1.2 seconds to 400ms.

* Added a filter to add to list when there are more than 5 reading lists

* Added download reading list (will be removed, just saving for later). Fixes around styling on reading lists

* Removed ability to download reading lists

* Tweaked the logic for infinite scroller to be much smoother loading next/prev chapter. Added a bug marker for a concurrency bug.

* Updated the top spacer so that when you hit the top, you stay at the page height and can now just scroll up.

* Got the logic for scrolling up. Now just need the CSS then cont infinite scroller will be working

* More polishing on infinite scroller

* Removed IsSpecial on volumeDto, which is not used anywhere.

* Cont Reading inf scroller edition is done.

* Code smells and fixed package.json explore script
2021-09-11 11:47:12 -07:00
Joseph Milazzo
cb3929e499
Performance Improvements (#568)
* Refactored the performance of GetChapter/BookInfo API to have a 10x speed improvement and to use common code, rather than duplicating code. Removed an api param that is no longer needed.

* Book reader now has dedicated buttons to jump to next/prev chapter as well as through page buttons
2021-09-08 16:26:09 -07:00
Joseph Milazzo
cf7a9aa71e
Reading Lists & More (#564)
* Added continous reading to the book reader. Clicking on the max pages to right of progress bar will now go to last page.

* Forgot a file for continous book reading

* Fixed up some code regarding transitioning between chapters. Arrows now show to represent a chapter transition.

* Laid the foundation for reading lists

* All foundation is laid out. Actions are wired in the UI. Backend repository is setup. Redid the migration to have ReadingList track modification so we can order them for the user.

* Updated add modal to have basic skeleton

* Hooked up ability to fetch reading lists from backend

* Made a huge performance improvement to GetChapterIdsForSeriesAsync() by reducing a JOIN and an iteration loop. Improvement went from 2 seconds -> 200 ms.

* Implemented the ability to add all chapters in a series to a reading list.

* Fixed issue with adding new items to reading list not being in a logical order. Lots of work on getting all the information around the reading list view. Added some foreign keys back to chapter so delete should clean up after itself.

* Added ability to open directly the series

* Reading List Items now have progress attached

* Hooked up list deletion and added a case where if doesn't exist on load, then redirect to library.

* Lots of changes. Introduced a dashboard component for the main app. This will sit on libraries route for now and will have 3 tabs to show different sections.

Moved libraries reel down to bottom as people are more likely to access recently added or in progress than explore their whole library.

Note: Bundles are messed up, they need to be reoptimized and routes need to be updated.

* Added pagination to the reading lists api and implemented a page to show all lists

* Cleaned up old code from all-collections component so now it only handles all collections and doesn't have the old code for an individual collection

* Hooked in actions and navigation on reading lists

* When the user re-arranges items, they are now persisted

* Implemented remove read, but performance is pretty poor. Needs to be optimized.

* Lots of API fixes for adding items to a series, returning items, etc. Committing before fixing incorrect fetches of items for a readingListId.

* Rewrote the joins for GetReadingListItemDtosByIdAsync() to not return extra records.

* Remove bug marker now that it is fixed

* Refactor update-by-series to move more of the code to a re-usable function for update-by-volume/chapter APIs

* Implemented the ability to add via series, volume or chapter.

* Added OPDS support for reading lists. This included adding VolumeId to the ReadingListDto.

* Fixed a bug with deleting items

* After we create a library inform user that a scan has started

* Added some extra help information for users on directory picker, since linux users were getting confused.

* Setup for the reading functionality

* Fixed an issue where opening the edit series modal and pressing save without doing anything would empty collection tags. Would happen often when editing cover images.

* Fixed get-next-chapter for reading list. Refactored all methods to use the new GetUserIdByUsernameAsync(), which is much faster and uses less memory.

* Hooked in prev chapter for continuous reading with reading list

* Hooked up the read code for manga reader and book reader to have list id passed

* Manga reader now functions completely with reading lists

* Implemented reading list and incognito mode into book reader

* Refactored some common reading code into reader service

* Added support for "Series -  - Vol. 03 Ch. 023.5 - Volume 3 Extras.cbz" format that can occur with FMD2.

* Implemented continuous reading with a reading list between different readers. This incurs a 3x performance hit on the book info api.

* style changes. Don't emit an event if position of draggable item hasn't changed

* Styling and added the edit reading list flow.

* Cleaned up some extra spaces when actionables isn't shown. Lots of cleanup for promoted lists.

* Refactored some filter code to a common service

* Added an RBS check in getting Items for a given user.

* Code smells

* More smells
2021-09-08 12:03:27 -05:00
Joseph Milazzo
0d2d73e8ae
Bugfix/release cleanup (#512)
* Lots of cleanup on the warnings in the solution. Deprecated IsLastWriteLessThan and made a new method HasFileBeenModifiedSince.

* Added some tests for the new extension method.

* Changed filter import to use correct import

* Scan Series now uses Refresh Metadata for Series, rather than library one.

* Fixed an issue where cover generation wasn't properly taking forced update into consideration. Removed a case of cover generation for no reason.

* Fixed series downloads not triggering backend call
2021-08-21 10:03:47 -07:00
Joseph Milazzo
3c9f73ce2c
Performance/cache epub (#438)
Changed: (Performance) Added the ability for epubs to cache, allowing faster page load for users with network mounted storage. (Fixes Investigate caching epubs (benefit for network mounted users) #433 )
2021-07-25 19:43:37 -05:00
Joseph Milazzo
b0df67cdda
PDF Support + MORE!!!! (#416)
# Added
- Added support for PDFs within Kavita. PDFs will open in the Manga reader and you can read through them as images. PDFs are heavier than archives, so they may take longer to open for reading. (Fixes #187)

# Changed
- Changed: Major change in how Kavita libraries work. Kavita libraries will now allow for mixed media types, that means you can have raw images, archives, epubs, and pdfs all within your Manga library. In the case that the same Series exists between 2 different types of medias, they will be separated and an icon will show to help you identify the types. The correct reader will open regardless of what library you are on. Note: Nightly users need to delete their Raw Images libraries before updating.

# Fixed
- Fixed: Fixed an issue where checking if a file was modified since last scan always returned true, meaning we would do more I/O than was needed (Fixes #415)
- Fixed: There wasn't enough spacing on the top menu bar on the Manga reader
- Fixed: Fixed a bug where user preferences dark mode control always showed true, even if you were not using dark mode

# Dev stuff
- For image extraction, if there is only 1 image we will extract  just that, else we will extract only images
- Refactored all the Parser code out of the ScannerService into a self contained class. The class should be created for any scans, allowing multiple tasks to run without any chance of cross over.



* Fixed indentation for cs files

* Fixed an issue where the logic for if a file had been modified or not was not working and always saying modified, meaning we were doing more file I/O than needed.

* Implemented the ability to have PDF books. No reader functionality.

* Implemented a basic form of scanning for PDF files. Reworked Image based libraries to remove the need to separate in a special library and instead just work within the Manga/Comic library.

* Removed the old library types.

* Removed some extra code around old raw library types

* Fully implemented PDF support into Kavita by using docnet. Removed old libraries we tried that did not work. PDFs take about 200ms to save the file to disk, so they are much slower than reading archives.

* Refactored Libraries so that they can have any file extension and the UI will decide which reader to use.

* Reworked the Series Parsing code.

We now use a separate instance for each task call, so there should be no cross over if 2 tasks are running at the same time.

Second, we now store Format with the Series, so we can have duplicate Series with the same name, but a different type of files underneath.

* Fixed PDF transparency issues

- Used this code to fix an issue when a PDF page doesn't have a background. https://github.com/GowenGit/docnet/issues/8#issuecomment-538985672

- This also fixes the same issue for cover images

* Fixed an issue where if a raw image was in a directory with non-image files, those would get moved to cache when trying to open the file.

* For image extraction, if there is only 1 image, just copy that to cache instead of everything else in the directory that is an image.

* Add some spacing to the top menu bar

* Added an icon to the card to showcase the type of file

* Added a tag badge to the series detail page

* Fixed a bug in user preferences where dark mode control would default to true, even if you weren't on it

* Fixed some tests up

* Some code smells

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
2021-07-22 21:13:24 -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
d02d2d3cb5
Epub 3.2 Collection Tag support (#308)
* Hooked up logic for collections based on EPUB3.2 Spec and Fixed improper tags in EPUBs since it is XML and we are using HTML to parse it.

* Fixed a bug with src:url url replacing so that it's much cleaner regex
2021-06-15 09:51:37 -05:00
Joseph Milazzo
d7d7f9b529
Collection Support (#234)
* Readme refactored to be more clean and clear, taking inspiration from wiki.js's readme.

* Initial backend for Collections and basic metadata implemented.

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

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

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

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

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

* Added a seed code to ensure all series have SeriesMetdata

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

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

* Fixed GetSeriesDtoForCollectionAsync which was not properly returning series

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

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

* Implemented updateTag api

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

* Cleanup, sorting, and null check

* More sorting changes

* Ensure we can delete tags when editing a series tags

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

* Code smells
2021-05-30 17:24:23 -05:00
Joseph Milazzo
f694145cd9
Feature/tech debt (#199)
* Added an icon for building the exe

* Technical debt
2021-05-05 21:00:50 -05:00
Joseph Milazzo
e2e755145c
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)
2021-05-02 10:00:47 -05:00
Joseph Milazzo
6d74215262
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
2021-04-30 17:23:31 -05:00
Joseph Milazzo
a01613f80f
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
2021-04-28 16:16:22 -05:00