From e6cfa4feca6340031988f839204313f8ec5fdd3a Mon Sep 17 00:00:00 2001 From: Joseph Milazzo Date: Thu, 3 Jun 2021 18:33:24 -0500 Subject: [PATCH] Bugfix/anchor rewriting (#260) * Added book reader reading direction preference * Adds a new marker to the AppUserProgress to capture nearest anchor for resuming scroll point when reading books. Refactored bookmark api to return a BookmarkDto which includes this new data. * Fixed the readme image displaying issue and changed up a bit more of the layout. --- API/Services/BookService.cs | 7 +++++-- README.md | 23 +++++++++++++---------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/API/Services/BookService.cs b/API/Services/BookService.cs index c5a3e26f5..08c4e2209 100644 --- a/API/Services/BookService.cs +++ b/API/Services/BookService.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; +using System.Web; using API.Entities.Enums; using API.Interfaces; using API.Parser; @@ -69,9 +70,11 @@ namespace API.Services public static void UpdateLinks(HtmlNode anchor, Dictionary mappings, int currentPage) { if (anchor.Name != "a") return; - var hrefParts = BookService.CleanContentKeys(anchor.GetAttributeValue("href", string.Empty)) + var hrefParts = CleanContentKeys(anchor.GetAttributeValue("href", string.Empty)) .Split("#"); - var mappingKey = hrefParts[0]; + // Some keys get uri encoded when parsed, so replace any of those characters with original + var mappingKey = HttpUtility.UrlDecode(hrefParts[0]); + if (!mappings.ContainsKey(mappingKey)) { if (HasClickableHrefPart(anchor)) diff --git a/README.md b/README.md index 48f975d55..a3fd09193 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Kavita
-![alt text](https://github.com/Kareadita/kareadita.github.io/blob/main/img/features/seriesdetail.PNG?raw=true) + +![Cover Image](https://github.com/Kareadita/kareadita.github.io/blob/main/img/features/seriesdetail.PNG?raw=true) Kavita is a fast, feature rich, cross platform reading server. Built with a focus for manga, and the goal of being a full solution for all your reading needs. Setup your own server and share @@ -18,14 +19,15 @@ your reading collection with your friends and family!
## Goals: -* Serve up Manga/Webtoons/Comics (cbr, cbz, zip/rar, raw images) and Books (epub, mobi, azw, djvu, pdf) -* First class responsive readers that work great on any device -* Provide a dark theme for web app -* Provide hooks into metadata providers to fetch metadata for Comics, Manga, and Books -* Metadata should allow for collections, want to read integration from 3rd party services, genres. -* Ability to manage users, access, and ratings -* Ability to sync ratings and reviews to external services -* And so much [more...](https://github.com/Kareadita/Kavita/projects) +- [x] Serve up Manga/Webtoons/Comics (cbr, cbz, zip/rar, 7zip, raw images) and Books (epub, mobi, azw, djvu, pdf) +- [x] First class responsive readers that work great on any device +- [x] Provide a dark theme for web app +- [ ] Provide hooks into metadata providers to fetch metadata for Comics, Manga, and Books +- [ ] Metadata should allow for collections, want to read integration from 3rd party services, genres. +- [x] Ability to manage users, access, and ratings +- [ ] Ability to sync ratings and reviews to external services +- [x] Fully Accessible +- [ ] And so much [more...](https://github.com/Kareadita/Kavita/projects) # How to contribute @@ -70,10 +72,11 @@ services: restart: unless-stopped ``` -Note: Kavita is under heavy development and is being updated all the time, so the tag for current builds is :nightly. The :latest tag will be the latest stable release. There is also the :alpine tag if you want a smaller image, but it is only available for x64 systems. +**Note: Kavita is under heavy development and is being updated all the time, so the tag for current builds is :nightly. The :latest tag will be the latest stable release. There is also the :alpine tag if you want a smaller image, but it is only available for x64 systems.** ## Got an Idea? Got a great idea? Throw it up on the FeatHub or vote on another persons. Please check the [Project Board](https://github.com/Kareadita/Kavita/projects) first for a list of planned features. + [![Feature Requests](https://feathub.com/Kareadita/Kavita?format=svg)](https://feathub.com/Kareadita/Kavita) ## Want to help?