58 Commits

Author SHA1 Message Date
Joseph Milazzo
2809233de0
Update Notifier (#464)
# Added
- Added: Ability to check for updates (stable-only) and be notified with a changelog. This is a first pass implementation. 
- Added: Ability to use SignalR within Kavita (websockets)
=====================================

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

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

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

Debug: Active indicators for users currently on your server.

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

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

* Fixed a dark mode bug from previous commit

* Release notes is now rendered markdown

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

* Fixed a missing padding

* Cleanup, added some temp code to carousel

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

* Misc cleanup

* Added readonly to one variable

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

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

* SplitQuery in GetRecentlyAdded for a speed increase on API.

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

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

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

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

* more textual changes

* Code smells
2021-08-09 08:52:24 -05:00
Joseph Milazzo
2f8af9f8e6
Fixed the In progress API returning back series that didn't belong (#453)
* Fixed the In progress API returning back series that had another users progress on them. Added SplitQuery which speeds up query significantly.

* Try out putting PR body into notification
2021-07-30 09:02:17 -05:00
Joseph Milazzo
fd6fa2fce4
Bugfix/in progress (#452)
# Fixed
- Fixed: Fixed an issue in In Progress where it would not pull the series with correct pagination due to the unique situation with the query. All series that are in progress should now return. 
============================
* Fixed In Progress not showing for all series due to pagination bug

* Version bump
2021-07-29 19:57:06 -05:00
Joseph Milazzo
58856c0d70
Filtering Bugs (#447)
# Fixed
- Fixed: Fixed an issue with filtering, after applying a filter, the cards on screen did not update with the correct information
- Fixed: Pagination is now slighlty smaller (only 8 pages) as on mobile, it was cutting off screen.

# Changed
- Changed: During library scan and series updates, Series names for Epubs will now trim excess white space
===============================================

* Fixed issue where some formats could get returned with another format filter.

* Filtering was not properly flushing DOM on filter change, updated trackbyidentity to account for filter

* One more fix for the filtering bug

* Made pagination UI slightly smaller to better fit on mobile phones. Trim() series names for Epub files and Trim() on series update for appropriate fields.

* Removed a no longer needed animation.
2021-07-28 14:11:49 -05:00
Joseph Milazzo
b9f20f4d19
Filtering First Pass (#442)
# Added
- Added: Added "In Progress" view to see everything you are currently reading
- Added: Added the ability to filter series based on format from "In Progress", "Recently Added", "Library Detail" pages.
- Added: Added total items to the above pages to showcase total series within Kavita

==============================
* Added filtering to recently added

* Cleaned up the documentation on the APIs and removed params no longer needed.

* Implemented Filtering on library detail, in progress, and recently added for format. UI is non-final.

* Moved filtering to an expander panel

* Cleaned up filtering UI a bit

* Cleaned up some code and added titles on touched pages

* Fixed recently added not re-rendering page

* Removed commented out code

* Version bump

* Added an animation to the filtering section

* Stashing changes, needing to switch lazy loading libraries out due to current version not trigging on dom mutation events

* Finally fixed all the lazy loading issues and made it so pagination works without reloading the whole page.
2021-07-27 18:39:53 -05:00
Joseph Milazzo
81dfd63250
Feature/performance pdf (#426)
#  Added
- Added: Added series format information to the search typeahead to help identify duplicate series in libraries

# Fixed
- Fixed: Fixed accent color not looking well on light theme
- Fixed: Attempted to fix the memory issues with PDF reading on Docker. Uses a Memory Pool for streams and removes a bitmap operation for fixing books with transparent backgrounds (#424)

# Changed
- Changed: Refactored download logs to use the same download code as rest of Kavita 

# Dev stuff
- Added timeout for Regex's to make sure during matching, malicious filenames doesn't crash user system
- Refactored a missing GetCoverImage to use Series Format rather than old Library Type

==================================================
* Added Timeout for Regex matching to ensure malicious filenames don't crash system

* Refactored GetCoverImage to use series format rather than library type

* Refactored download logs to use the download service

* Fixed accent color not looking well on light theme

* Refactored series format into dedicated component and added to search results

* Switch to using MemoryManager for Streams to attempt to minimize GC pressure and reduced bitmap manipulation for transparency hack.
2021-07-24 16:17:13 -05:00
Joseph Milazzo
ebd4ec25bf
Shakeout Fixes (#422)
# Fixed
- Fixed: Clean the pdf extension from Series title for PDF types
- Fixed: Fixed a bug where a forced metadata refresh wouldn't trigger a volume to force a refresh of cover image
- Fixed: Fixed an issue where Removing series no longer on disk would not use the Series Format and thus after deleting files, they would not be removed.
- Fixed: Fixed an issue with reading a single image file, where the cache code would not properly move the file
- Fixed: For Specials, Get Next/Prev Chapter should use the filename instead of arbitrary Number (which is always 0). Use the same sorting logic when requesting volumes on series detail, so sorting can happen in the backend.

# Added
- Added: (Accessibility) Nearly every page has had a title set for it 

===============================================================================

* Clean the pdf extension from ParseSeries

* Fixed a bug where forced metadata refresh wouldn't trigger the volume to update it's image.

* Added titles to most pages to help distinguish back/forward history.

Fixed a bug in the scanner which didn't account for Format when calculating if we need to remove a series not on disk.

* For Specials, Get Next/Prev Chapter should use the filename instead of arbitrary Number (which is always 0). Use the same sorting logic when requesting volumes on series detail, so sorting can happen in the backend.

* Fixed unit tests
2021-07-23 18:02:14 -05:00
Joseph Milazzo
be2b78fa5a
Manga Redesign (#321)
* Code cleanup, refactored FileRepository into Unit of Work.

* Added AutoCloseMenu and ReaderMode user perferences to match UI

* Added extra information to ChapterInfo

* Build changes

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

* Fixed an issue with UnitOfWork refactor and how stats was bootsrapped. Replaced stats.kavitareader with a temp url to test out redirection bug.
2021-06-24 19:31:42 -05:00
Joseph Milazzo
16a77fa8d6
Download Support (#298)
* Implemented the ability to download files (series, volume, chapter)

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

* Added the ability to change a users feature RBS. Changed the Role seed to use reflection
2021-06-10 07:47:35 -05:00
Robbie Davis
606e4c8b12
Recently Added Page (#261)
- Updated route task for 'recently-added'.
- Refactored GetRecentlyAdded task instead of creating new API task. This way is more efficient and prevents bloat.
- Adding pageSize to UserParams.cs (got lost in PRs).
2021-06-04 10:09:33 -05:00
Joseph Milazzo
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
2be1630af3
Tap to Paginate User Pref (#197)
* Fixed In Progress and removed comments

* Tap to Paginate user setting is implemented. Fixes #193
2021-05-04 17:01:27 -05:00
Joseph Milazzo
9c43833989
Bugfixes/misc (#196)
* Removed an error log statment which wasn't valid. Was showing error when a comicinfo.xml was not found in a directory.

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

* Fixes #192

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

* Added another case for Regex parsing for VanDread-v01-c01.zip
2021-05-02 19:46:34 -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
35a47f5d88
Book Feedback and small bugs (#183)
* Remove automatic retry for scanLibraries as if something fails, it wont pass magically. Catch exceptions when opening books for parsing and swallow to ignore the file.

* Delete extra attempts

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

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

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

* Implemented the ability to automatically scale the manga reader based on screen size.
2021-04-29 17:52:34 -05:00
Joseph Milazzo
09a953be8c
Feature/bugfix and regex (#174)
* Fixed #172

* Fixes #164

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

* Fix annoying warning about SplitQuery on GetLibraryDtosForUsernameAsync
2021-04-13 14:30:57 -05:00
Joseph Milazzo
d3c14863d6
Performance, Scan Loop, Specials, and cleanup (#150)
* More cases for parsing regex

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

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

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

* Updated dependencies to lastest stable.

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

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

* Ensure UpdateSeries checks all libraries for unique name.

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

* No Tracking when we aren't using entities.

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

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

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

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

* Refresh metadata on UI should call the task directly

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

* Fixed #142 - Library cards should be sorted.

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

* Implemented ScanLibrary but abandoning it.

* Code Cleanup & removing ScanSeries code.

* Some more tests and new Comparators for natural sorting.

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

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

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

* Don't let specials generate cover images

* Don't let specials generate cover images

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

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

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

* Missed a build issue somehow...

* Some code smells
2021-04-05 08:37:45 -05:00
Joseph Milazzo
7790cf31fd
In Progress Query Update (#145)
* Fixed a bug where chapter cover images weren't being updated due to a missed not.

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

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

* Updated dependencies to lastest stable.

* LastModified on Volumes wasn't updating, validated it does update when data is changed.
2021-04-01 16:11:06 -05:00
Joseph Milazzo
ca5c666b7b
In Progress Activity Stream Fixes (#136)
* Fixed a bug in In-Progress where it wasn't properly fetching series.
2021-03-31 14:50:03 -05:00
Joseph Milazzo
70cc163cb0 More cleanup 2021-03-23 14:41:14 -05:00
Joseph Milazzo
d73bd22db2 Some code cleanup 2021-03-23 12:22:47 -05:00
Joseph Milazzo
f77de66d97 ContinueReading has been pulled from UI. The query doesn't work and no longer sure I need. 2021-03-20 12:44:18 -05:00
Joseph Milazzo
a125b2ac0b Fixed GetInProgress API - The condition for PagesRead needed to be a sum for all progress, not each row. 2021-03-18 14:18:56 -05:00
Joseph Milazzo
0a85555f38 Temp commit to record attempts. Stream APIs are implemented and working. Added some new test cases based on deployed Kavita server testing. 2021-03-17 14:29:50 -05:00
Joseph Milazzo
fad4ca4414 Lots of Hangfire attempts to solve the lock issue. Not sure how to fix it. Added some APIs for streams. 2021-03-15 13:49:13 -05:00
Joseph Milazzo
9035b6cc4e Hangfire now dies gracefully when using CTRL+C rather than Stop button in Rider. Implemented one stream method for testing. Regenerated a few migrations due to oversight in index not taking account of library. 2021-03-15 08:43:43 -05:00
Joseph Milazzo
1f24725905 Added indexes to Series table for searching. Removed byte[] from SearchResultDTO. Added response caching for all APIs. Responses are cached for 10 seconds. 2021-03-12 18:21:13 -06:00
Joseph Milazzo
24118da49c Added localizedName for search function 2021-03-12 13:23:21 -06:00
Joseph Milazzo
af35d8aad5 Cleanup of lazy loading code. Made some DTOs use init rather than set to keep it clean. 2021-03-12 13:20:08 -06:00
Joseph Milazzo
33515ad865 First pass for supporting lazy loading and not using base64 strings for loading images in UI. 2021-03-12 12:22:04 -06:00
Joseph Milazzo
5be01b529b Removed failed attempts 2021-02-17 15:29:27 -06:00
Joseph Milazzo
922c0153d3 Added series progress/rating information back in. Left attempts at doing via a JOIN or raw SQL. 2021-02-17 15:28:57 -06:00
Joseph Milazzo
222959981f Implemented pagination on GetSeriesForLibrary 2021-02-17 11:23:08 -06:00
Joseph Milazzo
b4ee16d8d1 Code cleanup. Implemented ability to schedule Library Backups. 2021-02-17 08:58:36 -06:00
Joseph Milazzo
83b9394b17 Implemented ability to mark a series as Read/Unread. 2021-02-16 12:48:04 -06:00
Joseph Milazzo
2887fab53f Implements search functionality and prepares for upcoming paging in v0.3. 2021-02-15 13:08:30 -06:00
Joseph Milazzo
10c8ea34fe Cleanup after feature implementation. 2021-02-04 17:01:37 -06:00
Joseph Milazzo
0f82b45b9d Refactored Cache Cleanup code. 2021-02-02 09:38:10 -06:00
Joseph Milazzo
53e85317f9 Refactored DB to be Series->Volumes->Chapters instead. All functionality that previously worked still works. Cleanup still needed. 2021-02-01 09:29:11 -06:00
Joseph Milazzo
6b76c8b211 Refactored archive code into a service so that I can write tests for it. 2021-01-26 09:55:15 -06:00
Joseph Milazzo
a057e3ce1d Lots of bug fixes around publishing and handling weird cases on a real manga library. Implemented ability to have Volumes number 0 aka just latest chapters. Refactored DirectoryService code for scanning into it's own service. Lots of debug code, will be cleaned up later. 2021-01-23 17:44:48 -06:00
Joseph Milazzo
ac993a59ba Implemented ability to leave a rating (up to 5 stars) and a text review (not UI supported until v0.2). 2021-01-19 17:06:26 -06:00
Joseph Milazzo
3c8e4b2240 Cleaned up some warnings and implemented re-occuring scan libraries task. Customization of task schedules is in v0.2. 2021-01-19 14:41:50 -06:00
Joseph Milazzo
e180032a8e ScanLibrary now respects the library a series belongs to, doesn't reset series every run but updates/removes/inserts as needed. 2021-01-19 14:35:24 -06:00
Joseph Milazzo
14e8c3b820 Fixed some APIs that worked mins ago....something strange happening with EF relationships. 2021-01-19 10:45:37 -06:00
Joseph Milazzo
4a2296a18a Minor cleanup. Next commit will cleanup repositories and code base to be more concise. 2021-01-18 10:46:42 -06:00
Joseph Milazzo
effdf07cef Very messy code that implements read status tracking. Needs major cleanup. 2021-01-17 15:05:27 -06:00
Joseph Milazzo
56e8a0059e Implemented ability to delete a series. Refactored some operations to remove unneeded parameters. 2021-01-12 16:51:23 -06:00