1499 Commits

Author SHA1 Message Date
majora2007
ac9f1c722e Bump versions by dotnet-bump-version. 2022-08-22 17:30:48 +00:00
Joseph Milazzo
1c9544fc47
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
2022-08-22 10:14:31 -07:00
majora2007
354be09c4c Bump versions by dotnet-bump-version. 2022-08-20 20:43:40 +00:00
tjarls
329970f01b
Simplify parent lookup with Directory.GetParent (#1455)
* Simplify parent lookup with Directory.GetParent

* Address comments
2022-08-20 13:31:00 -07:00
majora2007
66a998425b Bump versions by dotnet-bump-version. 2022-08-20 16:48:23 +00:00
Joseph Milazzo
7cb547f2f9
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
2022-08-20 09:35:31 -07:00
majora2007
252f31db3a Bump versions by dotnet-bump-version. 2022-08-19 15:37:17 +00:00
Joseph Milazzo
0c9c20a094
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.
2022-08-19 08:23:12 -07:00
majora2007
df094f58c9 Bump versions by dotnet-bump-version. 2022-08-19 12:56:00 +00:00
Joseph Milazzo
0eac193248
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
2022-08-19 05:42:38 -07:00
majora2007
8708b9ced5 Bump versions by dotnet-bump-version. 2022-08-17 14:01:12 +00:00
Joseph Milazzo
ae891c34a2
Version bump (#1442) v0.5.5 2022-08-17 06:47:07 -07:00
majora2007
9f4d50584e Bump versions by dotnet-bump-version. 2022-08-16 19:23:43 +00:00
Joseph Milazzo
9d90652792
Release Shakeout Part 1 (#1440)
* Bumped docnet back up, as user issue was not related to the version. Reworked the logic flow for ConfirmEmailToken. Added new test cases for a bug reported around Docnet and weird characters.

* Removed a duplicate remove from want to read list

* Fixed an issue where series detail didn't appopriately handle remove from want to read.

* Added pagination information to want to read, fixed remove from want to read not reloading page

* When clearing a series of bookmarks, automatically refresh page.

* Added a continue button on reading list page so user can continue where they left off (progress) or start at beginning

* Added todo about design idea

* Added a bug marker
2022-08-16 12:04:21 -07:00
majora2007
a3a0b61fc0 Bump versions by dotnet-bump-version. 2022-08-14 14:48:40 +00:00
Joseph Milazzo
7a026e9497
File Created Date (#1434)
* Capture date when Kavita creates a MangaFile so we can show the date on the UI.

* On startup, exit early for migration directory if it's a fresh install and we have migrations to run but no settings stored yet.

* Blur summaries should apply when there isn't any read more collapsable

* Fixed custom theme files not loading.

* Cleaned up the logic for displaying the manga file date
2022-08-14 07:35:02 -07:00
majora2007
79b8df1112 Bump versions by dotnet-bump-version. 2022-08-14 13:53:11 +00:00
tjarls
c328f684a0
Volume relative numbering (#1421)
* Order issues by volume first is series detail

* Display volume along with chapter in chapters tab

* Move volume title to tooltip in card-item

* Consolidate card-item tooltip into one variable.

* Version as per comments
2022-08-14 06:40:46 -07:00
majora2007
f22e8e88d7 Bump versions by dotnet-bump-version. 2022-08-14 00:39:47 +00:00
Joseph Milazzo
e9c5cf3c92
Pre-Shakeout (#1429)
* Fixed zindex on some buttons due to a bug being fixed by bootstrap. Tweaked some styles from new bootstrap design.

* Fixed a bug where scan series, when generating cover images wouldn't emit cover updates to the UI.

* Fixed an issue where opening directory picker to change bookmark directory then clicking Share without chaning directory, would show the field as empty.

* Updating workflow

* Reverting version

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
2022-08-13 17:28:04 -07:00
majora2007
6ebad6cb48 Bump versions by dotnet-bump-version. 2022-08-12 21:40:09 +00:00
TheIceCreamTroll
58bee495d6
UI/dashboard polish (#1407)
* Reposition "Blur Unread Summaries" toggle under "Page Layout Mode"

* Save buttons now disable themselves after being clicked.
Change Password save button only enables if passwords match

* Center user roles to Roles: in admin dashboard

* Made ordering of common elements between series and entity info consistent.
Renamed "Read Left" to "Time Left"
2022-08-12 14:28:09 -07:00
majora2007
7093542d81 Bump versions by dotnet-bump-version. 2022-08-12 02:05:39 +00:00
Joseph Milazzo
4389971613
Relaxed CSP and undid the wwwroot copy again (#1428) 2022-08-11 18:52:48 -07:00
majora2007
2ae44a97c1 Bump versions by dotnet-bump-version. 2022-08-12 01:51:36 +00:00
Joseph Milazzo
a2fdbbf7c5
We need this (#1427) 2022-08-11 18:37:09 -07:00
majora2007
f9a60d6389 Bump versions by dotnet-bump-version. 2022-08-12 01:29:34 +00:00
Joseph Milazzo
b6a38bbd86
Lots of Bugfixes (#1426)
* Fixed bookmarks not being able to load due to missing [AllowAnonymous]

* Downgraded Docnet to 2.4.0-alpha2 which is the version we added our patches to. This might fix reports of broken PDF reading on ARM

* Updated all but one api in collections to admin only policy

* Ensure all config folders are created or exist on first load

* Ensure plugins can authenticate

* Updated some headers we use on Kavita to tighten security.

* Tightened up cover upload flow to restrict more APIs to only the admin

* Enhanced the reset password flow to ensure that the user passes their existing password in (if already authenticated). Admins can still change other users without having existing password.

* Removed an additional copy during build and copied over the prod appsettings and not Development.

* Fixed up the caching mechanism for cover resets and migrated to profiles. Left an etag filter for reference.

* Fixed up manual jump key calculation to include period in #

* Added jumpbar to reading lists page

* Fixed a double scrollbar on library detail page

* Fixed weird scroll issues with want to read

* Fixed a bug where remove from want to read list wasn't hooked up on series card

* Cleaned up Clear bookmarks to use a dedicated api for bulk clearing. Converted Bookmark page to OnPush.

* Fixed jump bar being offset when clicking a jump key

* Ensure we don't overflow on add to reading list

* Fixed a bad name format on reading list items
2022-08-11 18:16:31 -07:00
majora2007
7392747388 Bump versions by dotnet-bump-version. 2022-08-09 13:15:52 +00:00
Joseph Milazzo
b38a26f92b
Angular 14 (#1420)
* Updated to Angular 14

* Fixed all new tslint issues

* Fixed a routing bug for Angular 14

* Updated ngBootstrap and bootstrap. Fixed side nav item not highlighting on route change

* Refactored how default dark styles are done

* Migrated everything to a typed form

* Bump versions by dotnet-bump-version.

* Fixed a regression where click areas need an explicit z-index

* Cleanup some css

* Bumped docnet back to the alpha which has our downstream fixes

* Updated dependencies to later versions. Mainly just NetVips with some archive fixes.

* Fixed broken unit tests (due to some fixes in SharpCompress that changed byte arrays, but not visible quality)
2022-08-09 06:02:41 -07:00
majora2007
01e874150e Bump versions by dotnet-bump-version. 2022-08-08 22:11:42 +00:00
Joseph Milazzo
1ee6c3e506
Fixed access issues around new Authorize scheme. (#1417) 2022-08-08 15:00:10 -07:00
majora2007
f406a533d9 Bump versions by dotnet-bump-version. 2022-08-08 21:02:37 +00:00
Joseph Milazzo
88b5ebeb69
Security Hotfix (#1415)
* Updated ngx-extended-pdf-viewer to 14.5.2 + misc security vuln

* Hooked up remove from want to read AND fixed a bug in the logic that was removing everything BUT what was passed.

Allow for bookmarks to have date info for better ordering.

* Implemented a quick way to set darkneses level on manga reader for when nightlight just isn't dark enough

* Added Japanese Series name support in the Parser

* Updated our security file with our Huntr.

* Fixed a security vulnerability where through the API, an unauthorized user could delete/modify reading lists that did not belong to them.

Fixed a bug where when creating a reading list with the name of another users, the API would throw an exception (but reading list would still get created)

* Ensure all reading list apis are authorized

* Ensured all APIs require authentication, except those that explicitly don't. All APIs are default requiring Authentication.

Fixed a security vulnerability which would allow a user to take over an admin account.

* Fixed a bug where cover-upload would accept filenames that were not expected.

* Explicitly check that a user has access to the pdf file before we serve it back.

* Enabled lock out when invalid user auth occurs. After 5 invalid auths, the user account will be locked out for 10 mins.
2022-08-08 13:47:37 -07:00
majora2007
331e0d0ca9 Bump versions by dotnet-bump-version. 2022-08-07 16:09:24 +00:00
Joseph Milazzo
6787ea6b66
Create SECURITY.md 2022-08-07 08:56:37 -07:00
majora2007
4a81597860 Bump versions by dotnet-bump-version. 2022-07-28 22:31:06 +00:00
Joseph Milazzo
f130440bd0
Want to Read List (#1392)
* Implemented a Want To Read list of series for all users, as a way to keep track of what you want to read.

When canceling a bulk action, like Add to Reading list, the selected cards wont de-select.

* Hooked up Remove from Want to Read

* When making bulk selection, allow the user to click on anywhere on the card

* Added no series messaging

* Code cleanup
2022-07-28 15:18:35 -07:00
majora2007
495c986000 Bump versions by dotnet-bump-version. 2022-07-27 21:18:24 +00:00
Joseph Milazzo
58fb0d46b6
Fixed an issue where pages could be skipped in single due to prefetching overriding our recently set image (#1391) 2022-07-27 14:06:22 -07:00
majora2007
2636dd7919 Bump versions by dotnet-bump-version. 2022-07-27 15:29:42 +00:00
Joseph Milazzo
5812588fe5
misc stuff to avoid scan loop (#1389)
* Implemented a workaround for nginx users with BlockCommonExploits enabled, which would interfere with book image escaping done by Kavita when images had ../ in their path.

* Added back to top support on all pages but those that untilize virtual scrolling without a parent scroll.

* Hide jumpbar on pages where there is no scroll

* Refactored jumbar code into a dedicated service

* Stash some jumpkey resume code as I can't get it working with the virtual scroller.

* Don't allow non-admins to see File locations on card detail drawer.

* Some cleanup on GetServerInfo

* When an error occurs in register, delete the user on exception.

* Fixed a NPE in Stat collection for brand new users

* When we catch an exception on registering a new user, delete the user as rolling back doesn't do anything.

* Don't close typeahead when we are selecting options from it

* Added shortcut key H to open shortcut modal on manga reader

* When processing progress updates on cards, for volumes, properly find the chapter to update pages read.

* Hide cover image on reading list if it's not set and fixed a missing closing div tag

* Hide collection poster when nothing is set on collection detail

* Small fix around updating state

* Sped up the bookmark image call by removing one DB call

* Fixed broken test from change in bookmark code

* Fixed an oversight where if there is no tag in ComicInfo after a chapter was updated with People or Genres, then the People/Genres would never be removed.

* Added test with TagHelper

* Fixed a bug where 2 clear buttons would show on search bar due to browser injecting their own. Search bar wont show clear button until text is typed.

* Fixed a bug where InstallID wasn't being selected correctly in converter
2022-07-27 08:16:45 -07:00
majora2007
b90c6aa76c Bump versions by dotnet-bump-version. 2022-07-26 15:22:16 +00:00
Robbie Davis
ca9fb38112
Enhanced volume title in list view (#1390)
* Adding vol number to volume title in list view

* removing unnecessary code
2022-07-26 10:09:13 -05:00
majora2007
748ba23117 Bump versions by dotnet-bump-version. 2022-07-17 15:55:39 +00:00
Joseph Milazzo
1d806bf622
Create Users Manually (Email still required) (#1381)
* Implemented a manual button to allow users to setup an account, even after they invited.

Updated error toast to put "Error" in the title of the toast.

* Updated the exception middleware to always send full context instead of generic "Internal Server Error"
2022-07-17 08:43:03 -07:00
majora2007
63d74ecf9a Bump versions by dotnet-bump-version. 2022-07-17 15:26:15 +00:00
Joseph Milazzo
0a4252af32
Double Page Layout Fixes (#1380)
* 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

* Code is completely broken. Slowly rewriting the double page reader.

* Fixed a weird scenario where double page reader wouldn't work with using prefetched images. The image would be fine at setting but at some point, the actual image would render as +1.

* Fixed up manga reader for double including a bug with double (manga) where bookmarking wouldn't bookmark both pages
2022-07-17 08:13:19 -07:00
majora2007
35147d748c Bump versions by dotnet-bump-version. 2022-07-17 14:33:01 +00: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