Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF Support + MORE!!!! #416

Merged
merged 20 commits into from
Jul 23, 2021
Merged

PDF Support + MORE!!!! #416

merged 20 commits into from
Jul 23, 2021

Conversation

majora2007
Copy link
Member

@majora2007 majora2007 commented Jul 23, 2021

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 PDF Support #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 MangaFile.HasFileBeenModified() is not working correctly #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.

majora2007 and others added 18 commits July 22, 2021 10:31
… was not working and always saying modified, meaning we were doing more file I/O than needed.
…sed libraries to remove the need to separate in a special library and instead just work within the Manga/Comic library.
…d 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.
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.
- Used this code to fix an issue when a PDF page doesn't have a background. GowenGit/docnet#8 (comment)

- This also fixes the same issue for cover images
… files, those would get moved to cache when trying to open the file.
…he instead of everything else in the directory that is an image.
@majora2007 majora2007 mentioned this pull request Jul 23, 2021
2 tasks
@sonarcloud
Copy link

sonarcloud bot commented Jul 23, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@majora2007 majora2007 merged commit b0df67c into develop Jul 23, 2021
@majora2007 majora2007 deleted the feature/pdf-support branch July 23, 2021 02:13
@majora2007 majora2007 mentioned this pull request Jul 25, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MangaFile.HasFileBeenModified() is not working correctly PDF Support
2 participants