Closed Enduser-only closed 1 year ago
I will implement this by 2 steps maybe in next version:
1、Add a new read setting Always display spread pages alone
, if it is ebabled, JHenTai will display them alone as a single page while still displaying two single pages together when reading a gallery before or after a spread page
, otherwise spread page is the same as normal page.
2、Add a new button in top menu bar(with a shortcut key in desktop platform) if double column mode
is enabled, users can switch page offset between these two mode, and mode A is used by default.
You can check if this is enough, and i will check if it is easy to implement.
This looks exactly enough. Thank you for your hard work and fast response.
v7.2.2 has supported Display first page alone
, you can use shortcut key 'M' to toggle offset when double column is enabled.
But for display spread pages alone
, i have checked houdoku's implemention, it's only aimed at downloaded local gallerys
. But JHenTai need to deal with online gallerys
, downloading gallerys
and downloaded gallerys
.
online gallerys
and downloading gallerys
, display spread pages alone
is impossiable because some images' information is unknown when loading, we don't know their height or width(so we can't identify a image as a spread page
). Imagine we want to jump to page 100, we don't know which image should lie at page 100 because we don't know how many spread pages
exists before.downloaded gallerys
, i guess houdoku
use all images' information to compute before layout. Maybe i will implement like this later because it may require a lot of work, and i haven't stored downloaded images' information now.Here is what I believe is the implementation display spread pages alone
from the Tachiyomi fork TachiyomiJ2K
https://github.com/Jays2Kings/tachiyomiJ2K
I believe that it also deals with online gallerys
, downloading gallerys
and downloaded gallerys
.
Code regarding a wide image or spread page
begins to appear on line 350 starting with a comment. Here, a spread page
is referred to as fullPageSpread
https://github.com/Jays2Kings/tachiyomiJ2K/blob/21a2705c724a1251c2e57dce946809ef0c330d7c/app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt#L491
Here is another fork of tachiyomi that is called TachiyomiSY which also has display spread pages alone
and specifically deals with online gallerys
, downloading gallerys
and downloaded gallerys
from e-hentai and exhentai.
https://github.com/jobobby04/TachiyomiSY/tree/ee47d74b5e2473091a45919aa8c19d75d4176031
The code regarding double-page spread
can be found here starting with a comment on line 130
https://github.com/jobobby04/TachiyomiSY/blob/ee47d74b5e2473091a45919aa8c19d75d4176031/core/src/main/java/tachiyomi/core/util/system/ImageUtil.kt#L130
Apologizes for not also including implementation of display spread pages alone
by TachiyomiJ2K and TachiyomiSY the first time.
I downloaded TachiyomiSY and found a significant difference with JHenTai: when jumping to 100, TachiyomiSY jumps to 100th image while JHenTai jumps to page 100(means there may be 100-200 images before). Maybe i will change to TachiyomiSY's mechanism too for double column mode. It's will cost a lot of time because it means maybe i must rewrite double column mode totally. I will try to find a easy way to solve it :)
Thank you. I hope that you find a solution that you are satisfied with.
Basically supported in v7.3.1 and it's enabled by default. I will optimize later if there're any bugs.
需求 / Requirement
I would like the double column read mode to be able to identify spread pages and display them alone as a single page while still displaying two single pages together when reading a gallery before or after a spread page. In addition, I would like a page offset toggle for the double column read mode that will display the first page of a gallery alone while continuing to display the rest of the pages in a double column, unless it is a spread page. The offset toggle will be useful to fix alignment issues when pages are expected to be on a particular side.
建议实现 / Suggested implements
Spread pages can be identified as pages that are wider than they are taller (page width > page height). The offset toggle can be added as a menu bar item, next to the turn page interval button and settings button. The offset toggle can also be added to settings menu that appears once double column setting is enabled. While in desktop layout, the offset toggle could also be bound to a shortcut key.
备注 / Addition details
examples of similar features can be found in the following places: on the mangadex.org reader as the offset double spreads button
on the houdoku this feature is implemented as a toggle between three options: offset first page, offset all, no offset https://github.com/xgi/houdoku The following link shows example images of how pages may be mis-aligned either due to a spread and a single page appearing together, or an uneven amount of pages for a given gallery. https://github.com/xgi/houdoku/issues/171
The various forks of tachiyomi have this feature as the shift one page over button https://tachiyomi.org/ https://tachiyomi.org/forks/
自查步骤 / Verify steps