-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
[Feature Request] Tachiyomi Support #33
Comments
Thanks for reaching out! It looks like Tachiyomi does not have OPDS support (https://github.com/inorichi/tachiyomi/issues/2315), so to use Tachiyomi with Mango I have to develop a Tachiyomi extension for Mango. Unfortunately I don't write Java/Kotlin, so I will mark this issue as "help wanted" for now. It would be great if you could help to develop the extension! If nobody is able to help, I will try to do it myself when I have the time. |
you could ask @gotson maybe he could help. |
@Ruffyop good idea! Perhaps I can take a look at the komga plugin and see how it can be done. |
@hkalexling Please pardon me for resurrecting this issue. I'd also like to suggest a Tachiyomi integration, but basically the other way around. Therefore I'd like to synchonice or at the very least backup my Tachiyomi library to Mango. I'd say integrationg these services into Mango would actually aloww for a Tachiyomi / Mango sync without actually having a compatible interface between both environments directly. The services currently supported by Tachiyomi are:
|
For everyone following this, @goldbattle has created a Mango extension for Tachiyomi. It has the basic functionalities that you would expect, and we need to update the Mango API to improve its usability (see #170). |
@TheMuelli I think https://github.com/tachiyomiorg/tachiyomi/issues/4282 is what you are looking for? |
Seems like the Mango extension doesn't support Mango being addressed through a non-default port, right? That's a shame. :/ |
@GlassedSilver Thanks for letting me know. I took a look at the extension code and I think it's a mistake in the implementation. Multiple Mango instances can run on the same server and serve from different ports, so we store the session cookies as I should be able to work on this next month when I have more time. |
Sweet! Thank you so much for looking into it then already :) |
It would be nice to be able to add multiple instances like the komga extension do. |
@zFerry98 I am not entirely sure but I guess Tachiyomi itself doesn't support this, so there's nothing we can do as an extension. It was designed as a general reader that supports hundreds of sources and is not tailored for Mango itself. Please don't blame the Tachiyomi maintainers. They are not familiar with Mango and the Mango extension, so they might not be able to give you answers. |
I thought the example discussed showed the hierarchy of files as stored within Mango, no? Surely as long as Mango knows what chapter is in which file it can pass on to the extension in Tachiyomi however it expects it with or without a hierarchy, no? |
Unfortunately I don't know how to read the code, but the problem is that all the series that are like in example 2 (manga 2) go into error, saying: this series has no chapters. However, the problem is that if the .zip / cbz is immediately after the first folder (the one with the series name, usually), tachiyomi shows you the chapters / volumes. |
Tachiyomi through the Mango extension is only a receiver of what Mango running on a server sends to it. (unless I'm REALLY mistaken and my assumption is wrong, coming from Komga which is how it's handled there) So if you're trying to organize files in a folder structure like that on your Android with this extension, as far as I understood it, you're looking at the wrong extension I guess? |
@GlassedSilver ? So there are 2 cases:
THEY ARE JUST MY ASSUMPTIONS. |
I know how Komga works and what the difference is to Mango. Take a guess why I'm here. Because I figured Komga is conceptuallly leaning against supporting manga-specific usecases properly and instead resorts to blaming the user for having odd workflows. Sorry, but chapters are not books as in chapters don't have ISBNs.... I digress... No need to rant about that in here. :P I was just trying to make sure you're not putting the items in a local hierarchy on your phone manually and then trying to use mango and its extension to sync that. Since you use mango fully self-managed and with hiearchy on the server-side it does seem that you encountered unexpected behavior, but I'll reserve judgement here because I don't know so you're rightfully asking hkalexling. :) One thing I want to point out here though is this: if the extension receiving the files has to store them flattened we have to make sure that the flattened files don't cause file name collisions. You might have a chapter 1 PER VOLUME. (not that that is a typical numbering to my knowledge, but what do I know, I've seen odder things in my lifetime) Or something like "volume.cbz" residing in a "Volume 1" folder. Sure, we COULD blame bad naming here, but that's a bit cheap and in the end just causes the same: support tickets. Instead the collissions need to be detected and caught anyhow. Might as well one-way convert them. Or teach Tachiyomi's dev team the way of the hierarchy folder system and that it is superior, at the very least equally as justified. Might also be of value for its internal downloader for Mangadex, because Mangadex does have grouping by volume now as well. ;) |
I think @zFerry98 is not trying to organize the manga files on their phone. They have set up the files on their remote server correctly and can access them through the Mango web interface, but they are having trouble accessing the nested items in Tachiyomi through the extension. To make sure everyone is on the same page, here's how Tachiyomi interacts with its extensions:
Here's the base class for all sources: https://github.com/tachiyomiorg/tachiyomi/blob/12a593c3c69ad7767cce7a42f30af96a284474e5/app/src/main/java/eu/kanade/tachiyomi/source/Source.kt So the issue is, the Mango extension can't just pass anything to Tachiyomi, and there's no |
@GlassedSilver Better understand the potential of Mango (really long):In this case I put volume 0 (which is a separate manga) as an extra to the main series. This is because on Mango the 4 column view becomes "annoying" if there are 20 manga of the same series on the main page ... And this leads to other cool things like this:
|
@zFerry98 Then, is it ok that thousands of manga chapters in one series on tachiyomi? as I know, you have 35,000 entries with 40 top titles in your library. (out of story, are these 35,000 entries 300gb?)
to
|
Now (from #209): I was wondering where 35,000 came from ... It comes from here #79, we are talking about 1 year ago. I had put the folders as a library and mixed series that are now on Komga (what are now manga collections, some series were folders that served as a library ... since libraries are not yet supported). After several consultations with my friends, we came to the conclusion of separating the "libraries" between the two servers (also, especially since mango was very slow at the time). |
Great discussion guys! I like the idea of concatenating the names of nested folders. I will work on this together with some other improvements for the extension. |
@zFerry98 Thank you for replying. Then It would be appeared about 200 entries at chapter list of each top title. is it ok? @hkalexling I wrote the code in javascript for a PoC. I think replacing async function chapterListParse(url) {
var response = await fetch(url);
var json = await response.json(); // get contens as json
var parse = (title) => {
var deepEntries = [];
var titles = [title];
while (titles.length) {
parseInternal(titles, deepEntries);
}
return deepEntries;
}
var parseInternal = (titles, array, prefix = '') => {
if (titles.length === 0) return;
const title = titles.shift();
const titleId = title.id;
const titleName = `${prefix}${prefix.length === 0 ? '' : ' '}${title.title}`;
title.entries.forEach(entry => array.push({
entry,
titleId,
titleName,
}));
titles.push(...title.titles);
}
var flattenEntries = parse(json);
return flattenEntries.map(({ entry, titleId, titleName, }, index) => ({
chapter_number: index + 1,
name: `${index + 1} - ${titleName} ${entry.display_name}`,
url: `/page/${titleId}/${entry.id}/${entry.pages}/`,
date_upload: 1000 * entry.mtime,
}));
}
var run = (titleId) => chapterListParse(`/api/book/${titleId}`);
run('your title id').then(console.log); |
Good to know 👍. |
@Leeingnyo Thanks that would be helpful! While we are at it, I also plan to allow sorting entries from the API as there's an issue on this for the extension: https://github.com/tachiyomiorg/tachiyomi-extensions/issues/7980 @zFerry98 I think I have an idea why you are getting timeout. Currently we don't have an API endpoint for returning the top-level titles, so the extension has to request |
So my server explodes 😂. we are talking about 166 main series, based on the type of series there are from 4 to 24 volumes (some are gigantic series such as bleach with 74 volumes or one piece with 100 volumes and over 1000 chapters), on average a volume are or 4 chapters or 10. There are so many files for this. If we then count that some series are super ultra extreme high resolution (we are talking about 8k resolutions and some I thought they were even at 16k 🤣) |
@zFerry98 Dude, THANK YOU. You have said everything that has ever been on my mind about Komga. I really appreciate the app for what it is for comics, although that's not really "my turf" anymore. I used to read the Micky Mouse magazine and the thicker "LTB"s as they are referenced here in Germany (Donald Duck comic books as in... books not mags) Might come back to Komga again for that kinda stuff, but OH MY GOD you cannot properly organize manga in there without nannying the heck out of your chapters. The application doesn't even TRY to read the chapter number and assign a proper "book number". The claim to "also be for manga" is as far fetched as anything else. You could say it can also be an image gallery viewer, because technically you can store and serve up images in there... Sure... But it's not supported properly. UX is a nightmare for manga users. The second you have "off chapters" things get real ugly. Anyways, my ranting could only just further repeat what you already so eloquently put. This is exactly why I came here. Everything you said speaks to me on so many levels. One of the things I'm most passionate about is good, thorough and very detailed relational assignment (would be cool to mark one manga as a spin-off to another one within a franchise... huh? ;) @hkalexling), meta data support that's really strong rather than going the path of "let's be REALLLLLY considerate about which metadata we CANNOT live without... hey, everyone has very different needs how fine-grained they like their library to be managed and searchable. Oh and obviously good reading progress tracking. The combination of read progress tracked from server (server app and Web Reader) to client (through Tachiyomi extension ideally and additionally mirroring progress to MAL, AniList and Kitsu as well!) is really... just... lovely! That's the stuff I'm into! :D As for DJs... yeah still under massive (re-)construction, but I'm closely watching the HappyPandaX project. The current application is a bit buggy and hard to understand at first, so my usage with it is on a hiatus at the moment, but the moment a new release drops I'll get into it with a test lib of some beloved doujis right away again. :D As for LNs... well... would love to keep em next to the mangas they often are buddies with within the same franchise so... in Mango if possible. Now... I'd get REALLY super overly happy to have really good doujinshi support in here as well, but right now HPX looks so promising... ARGH... especially since it already has such good meta data support and everything, just needs technical - not conceptual rework. But the idea of... clicking on a franchise and seeing.... EVERYTHING associated with it at ONE GLANCE... Manga, LN, Doujinshis... all under one roof! Imagine that! Ah beautiful! And for stuff like fanart... well I do have my own Danbooru instance (LAN-only)... if I could link to the franchise tag's search query to my own danbooru instance from within Mango, maybe even embed results... side by side... Basically a franchise viewer and everything I got on it is literally one click away.... Hey even... list my Steam games or such... Okay I need to cool down... This is.... just heavenly fantasy. :D |
Also related: https://github.com/tachiyomiorg/tachiyomi/issues/1803 |
@hkalexling Timeout again 😭🤣 with 0.24.0 test build. |
@zFerry98 In 0.24.0, we have improved endpoints that should resolve this, but I will need to update the Tachiyomi extension to actually use those. This will have to wait until 0.24.0 is officially released. |
I supposed. |
@zFerry98 I updated the Mango extension to 1.2.6. See https://github.com/tachiyomiorg/tachiyomi-extensions/pull/9239. Now it should list nested entries and load the library much faster. Could you please give it a try? |
@hkalexling I've tested, it works! it shows nested entries well. |
😭😭🤷♂️ But this timeout seemed strange to me. It appears when he wants it |
@hkalexling @Leeingnyo , Extension Conf: Tachiyomi (original Tachiyomi): These two things I had to take out of the video because they showed the account password in clear 🙃. Before it was random this "timeout" has now become fixed. |
@zFerry98 I see. I think It's a problem that redirection to '/' after logging in (stucked at home page). Thanks a lot for recording a video. we could make For a slow home page, did you turn on a config |
The cache is already active from the "beta" (PR build). In fact, it now loads the library almost instantly (even on startup).
In my opinion, the homepage is slow because it looks for the various reading states and dates of addition from the json (thus having to read the entire info.json library). Then populate the homepage with updated data (the ones you read from the scattered .json).
As soon as I finish the full backup of the tablet nand, I do this test and log in 👍 |
@Leeingnyo Log: log.txt |
@zFerry98 Thank you for sharing! There is no problem with cache. I agree that we need to move metadata to a DB someday. |
@Leeingnyo @zFerry98 Thank you both for testing! Yes I forgot that the extension loads Before we release a new version of Mango with the authentication API, an easy workaround would be to access |
if you are referring to the login (of the extension), if you enter anything after the From the PC it is a completely different story. |
@zFerry98 No I mean I will update the extension so it uses something other than |
In the end, my "timeout" error, was it triggered by the home very slow to load? |
@zFerry98 the timeout would be bypassed! |
I was trying to do the |
Forgive me if this has been brought up before, but whilst I can now browse my nested chapters, they all get lumped together. I mean that as in:
Now I understand we cannot manipulate how many hierarchies Tachiyomi supports to show without forking it, without asking for it to be implemented successfully, etc... All fine. I see how in a 1-level hierarchy system we have to make do with all our chapters getting sorted just "one folder away". However, I would strongly suggest that the one supported level of hierarchy that is visible to the Tachiyomi extension is the last folder (unless it's a volume folder I guess, those should be ignored or merged into the name or something I don't know, someone please invest some brain juice into this, it's late over here :D) which is usually the series name. The first folder is almost assuredly not the series name in a world where the user has a multi-level hierarchy sorting system for their assets. :) Now I have just two series in my Tachiyomi. Manga and Webtoons :P But oh boy do they have a lot of chapters. wink ;) |
@GlassedSilver sorry for the long delay.
I am not sure I understand what you mean by the last folder here. Can you elaborate more (maybe with an example?) |
No problem! The lowest hierarchy folder usually is the series, sometimes it may be the volume. If you go with the approach to assign the first folder in the root as series name then you end up with something like this: |
Tachiyomi support for reading on android devices would be very nice for android devices.
The text was updated successfully, but these errors were encountered: