getmango / Mango

Mango is a self-hosted manga server and web reader
https://getmango.app
MIT License
1.68k stars 117 forks source link

[Feature Request] Tachiyomi Support #33

Open Gyokusai opened 4 years ago

Gyokusai commented 4 years ago

Tachiyomi support for reading on android devices would be very nice for android devices.

hkalexling commented 4 years ago

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.

Ruffyop commented 4 years ago

you could ask @gotson maybe he could help. he already has created a plugin for komga

hkalexling commented 4 years ago

@Ruffyop good idea! Perhaps I can take a look at the komga plugin and see how it can be done.

TheMuelli commented 3 years ago

@hkalexling Please pardon me for resurrecting this issue.

I'd also like to suggest a Tachiyomi integration, but basically the other way around. I actualy like Mango on Android very much, simply works.

Therefore I'd like to synchonice or at the very least backup my Tachiyomi library to Mango. Tachiyomi uses external services for a tracking of whats in your library and how far a reader has progressed.

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:

hkalexling commented 3 years ago

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).

hkalexling commented 3 years ago

@TheMuelli I think https://github.com/tachiyomiorg/tachiyomi/issues/4282 is what you are looking for?

GlassedSilver commented 2 years ago

Seems like the Mango extension doesn't support Mango being addressed through a non-default port, right? That's a shame. :/

hkalexling commented 2 years ago

@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 mango-sessid-[port-number] to distinguish them. The extension should prompt the user to enter the port number (have it default to 9000) and then use it to match the correct cookies ID. But the current implementation checks mango-sessid-9000 regardless of the actual port. See https://github.com/tachiyomiorg/tachiyomi-extensions/blob/b74b30d4fe5f7c35db111ab84671897e2e72449c/src/all/mango/src/eu/kanade/tachiyomi/extension/all/mango/Mango.kt#L214

I should be able to work on this next month when I have more time.

GlassedSilver commented 2 years ago

Sweet! Thank you so much for looking into it then already :)

Nerothos commented 2 years ago

It would be nice to be able to add multiple instances like the komga extension do.

VegethB commented 2 years ago

Hi, am I wrong or nest folders are not supported? Because the app sees me only the chapters of the series that are immediately a zip / cbz.

In order to understand each other: image Giving me as a mistake that in those series there are no chapters (those that are nested). I am writing here because in the past I have tried in the git issues of tachiyomi extensions, getting no answers from the original programmer (at least until you have fixed the port problem now)

hkalexling commented 2 years ago

@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.

GlassedSilver commented 2 years ago

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?

VegethB commented 2 years ago

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?

image

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. At the moment I can't even take screenshots from android because it keeps giving me "timeout" (but in the webview it loads after 1 2 minutes).

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. If there is even one subfolder in the series folder, tachiyomi tells me that he found no chapters / there aren't any.

GlassedSilver commented 2 years ago

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?

image

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. At the moment I can't even take screenshots from android because it keeps giving me "timeout" (but in the webview it loads after 1 2 minutes).

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. If there is even one subfolder in the series folder, tachiyomi tells me that he found no chapters / there aren't any.

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?

VegethB commented 2 years ago

@GlassedSilver ? You can't go wrong extension to use. Mango can only communicate with the extension "mango". Also there are no folder organization problems, this is because this is how mango works (unlike Komga which DOES NOT ALLOW SUBFOLDERS). The solution cannot be that I have to adapt myself to tachiyomi (or at least to the hierarchy that Komga uses). Therefore, I asked @hkalexling here if he could confirm if it was a bug this problem.

So there are 2 cases:

THEY ARE JUST MY ASSUMPTIONS.

GlassedSilver commented 2 years ago

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. ;)

hkalexling commented 2 years ago

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:

  1. The extension defines a list of functions callable from the main app. These include getMangaDetails, getChapterList, and getPageList.
  2. Tachiyomi then simply invokes these functions and wait for them to return data. When a user selects a manga, it invokes getChapterList to get and display the chapter list, and when the user opens a chapter it invokes getPageList to get the list of pages and their URLs.

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 getNestedMangaList function that we can override. I am not familiar with Tachiyomi but it likely has no support for nested folders. See https://github.com/tachiyomiorg/tachiyomi/issues/254#issuecomment-275941848

hkalexling commented 2 years ago

@zFerry98 regarding the timeout issue, we have merged a PR that improves the overall performance of Mango #222. It's already in dev and we will make an official release soon. Hope it can resolve #186 and fix the timeout issue on Tachiyomi.

VegethB commented 2 years ago

@GlassedSilver Let me be clear, I'm not trying to offend Komga or the people who prefer it that way. Mango allows you to create a real manga collection ... as long as there is a format compatible with the reader and that's it (unlike Komga which pretends to be Manga server but does not have 1 half compatibility with the WORLD standard of manga).

Better understand the potential of Mango (really long): ![image](https://user-images.githubusercontent.com/17975351/132981440-0fbb7f3b-f480-4dc9-bb86-ee2a32ab6ee0.png) ![image](https://user-images.githubusercontent.com/17975351/132981433-8a6166f5-4a98-4c74-82e5-f2acdb7f8b2f.png) 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: ![image](https://user-images.githubusercontent.com/17975351/132981728-8536d99e-2575-4e37-842f-7ec6b2c26030.png) ![image](https://user-images.githubusercontent.com/17975351/132981774-6d7bca4e-0ae7-4f98-b137-fec5fc6a67c4.png) ... even better: ![image](https://user-images.githubusercontent.com/17975351/132981803-8534cf01-f936-4832-b31e-8ce7027c80ba.png) ![image](https://user-images.githubusercontent.com/17975351/132981897-7ecd81d4-d853-4ef6-b216-a2caeecf751e.png) ![image](https://user-images.githubusercontent.com/17975351/132982356-fdaa5aff-21f7-45a2-89eb-af45299f4a96.png) ![image](https://user-images.githubusercontent.com/17975351/132982568-d5b5f2ec-f3de-4551-bceb-9c4161349129.png) Collection of "Fate Apocrypha" inside the collection of all "Fate" inside the root of the manga all together and all beautiful. -------------- ![image](https://user-images.githubusercontent.com/17975351/132981922-20757614-5797-4c85-954d-0d71fc09a477.png) ![image](https://user-images.githubusercontent.com/17975351/132981952-3219d26f-05e5-4c08-9440-f84776c9f5f4.png) ---------------------------------------------------------------------------------------------------------------------------------------------- This is called a "collection" ... however (at least for Komga) they cannot be displayed on the same page as the series (and the fact remains that you cannot make the collection in the collection as in mango). If we then count that Komga does not even support the sorting that the whole world uses for the names of chapters and .jpg/png files... Ex: 0.5; a, b, c; etc. ...I find it hard not to go wild if they tell me that Komga is also a manga server. Just open ANY site (mangadex just to name 1 ...) and ALL go to: Manga (folder1) > Volume XX (folder2) > Chapter XX.

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. :)

I could never put 300gb of manga in my smartphone 😂. It's all on the server and all managed by Mango (otherwise you don't need the mango extension on tachiyomi, just put the manga in the folder that tachiyomi uses for the manga you want to add manually).

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.

To get around the problem (since it seems that the tachiyomi development team is unwilling to support nesting), just add the folder name to the file name, ex:

Another > Extra > Volume 1 > Ch. 1.zip
              > Volume 1 > Ch. 1.zip

we get in the chapters list:

Extra_Volume 1 - Ch. 1
Volume 1 - Ch. 1

or

Ch. 1 [Extra_Volume 1]
Ch. 1 [Volume 1]

However, it would be enough to add the name of the subfolder to the file name, then the extension will take care of it and reconvert the logical name into the real name of the file together with the logical path and the real one (to get the file from the server). Always if possible (since I don't know if there are limitations for what the extension can do or otherwise)


@zFerry98 regarding the timeout issue, we have merged a PR that improves the overall performance of Mango #222. It's already in dev and we will make an official release soon. Hope it can resolve #186 and fix the timeout issue on Tachiyomi.

😬 is already in use (the build you find in the pull request you mentioned)

which at first seemed to be fine ... then having added more series to the server it returned in total timeout (even if on the Web side I notice the improvement a lot). I think there is something wrong with how tachiyomi handles the request to populate the getMangaDetails you were talking about. At the moment, mango from the Web is fully enjoyable even if it runs on WSL1. I wanted to use it on tachiyomi because tachiyomi has a more complete and "graphically beautiful" reader (I don't know how to explain it) but above all it marks me the chapters I read on AniList and MAL.

Anyway thanks for the answers, I can assure you that I was seriously giving up on manga until I found this software months ago. I used to swear to the Tenma server and the like. Komga has become the server for DJ and Light Novels (since the latter are mostly without subfolders) image

Leeingnyo commented 2 years ago

To get around the problem (since it seems that the tachiyomi development team is unwilling to support nesting), just add the folder name to the file name, ex:

Another > Extra > Volume 1 > Ch. 1.zip
              > Volume 1 > Ch. 1.zip

we get in the chapters list:

Extra_Volume 1 - Ch. 1
Volume 1 - Ch. 1

or

Ch. 1 [Extra_Volume 1]
Ch. 1 [Volume 1]

However, it would be enough to add the name of the subfolder to the file name, then the extension will take care of it and reconvert the logical name into the real name of the file together with the logical path and the real one (to get the file from the server). Always if possible (since I don't know if there are limitations for what the extension can do or otherwise)

@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?) Anyway, what you mentioned could be possible by fixing mango extension. but sub folder names just would be concatenated for easy implementation. i.e.

Another > Extra > Volume 1 > Ch. 1.zip
        > Volume 1 > Ch. 1.zip

to

Another > Extra Volume 1 Ch. 1.zip
        > Volume 1 Ch. 1.zip
VegethB commented 2 years ago

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?)

Now (from #209): image image

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). But despite the large number of files at the time (35,000) the mango root folder was about 70 80 gb. Now there are 27,000 but the content is completely different (only manga compared to DJs and Light Novels and manga together).

hkalexling commented 2 years ago

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.

Leeingnyo commented 2 years ago

@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 chapterListParse would be worked.

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);
VegethB commented 2 years ago

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.

Good to know 👍. I'm fighting with Tachiyomi to figure out what triggers the "timeout". Since tachiyomi does not give me clues (I also tried with the logcat reader but it does not find relevant results with "timeout", "192.168.1.2" and "mango" 😪), the only clue is the home page which is about 1 minute to show themselves. Because the "/library" page loads in no more than 5-10 seconds.

hkalexling commented 2 years ago

@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 /api/library, which returns the whole library as JSON. As you can imagine this would take a VERY long for large libraries. I will add a new endpoint for returning top-level titles only and it should resolve the issue.

VegethB commented 2 years ago

Then It would be appeared about 200 entries at chapter list of each top title. is it ok?

So my server explodes 😂. Root tree: output.txt

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 🤣)

GlassedSilver commented 2 years ago

@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

GlassedSilver commented 2 years ago

Also related: https://github.com/tachiyomiorg/tachiyomi/issues/1803

VegethB commented 2 years ago

@hkalexling Timeout again 😭🤣 with 0.24.0 test build. "timeout" out of thin air. I didn't touch anything, not even restarted or anything (server side). I haven't added any other series or anything. It just went back to giving timeouts.

hkalexling commented 2 years ago

@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.

VegethB commented 2 years ago

@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. But it is strange that as soon as I updated 0.24, it worked for about 1 day. He just loaded the library instantly. Anyway, go easy 👍. I have to update the firmware of the tablet (serious bug on stability) and for quite a while I don't have time to read manga (I have to reinstall and configure everything 😭)

hkalexling commented 2 years ago

@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?

Leeingnyo commented 2 years ago

@hkalexling I've tested, it works! it shows nested entries well.

VegethB commented 2 years ago

@zFerry98 I updated the Mango extension to 1.2.6. See tachiyomiorg/tachiyomi-extensions#9239. Now it should list nested entries and load the library much faster. Could you please give it a try?

😭😭🤷‍♂️ timeout... Explain to me how I can debug this hellish error. I just can't understand. Now I make a video (it will be long given the various timeouts to wait).

But this timeout seemed strange to me. It appears when he wants it

VegethB commented 2 years ago

@hkalexling @Leeingnyo , Video: https://mega.nz/file/hxFQnDSa#ACKzJFq02obfeSepkoqgvtfCXAEXE1auPMxjC1lh9oA

Extension Conf:

Immagine 2021-09-27 173856

Tachiyomi (original Tachiyomi):

Immagine 2021-09-27 174029

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.

image My manga library now

Leeingnyo commented 2 years ago

@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 /api/login for this.

For a slow home page, did you turn on a config cache_enable? Would you change log level to debug at confug.yml? and run mango with a command ./mango > log.txt in a terminal to save logs. after trying to access by tachiyomi and waiting some minutes (maybe 2 minutes?), turn off the mango (ctrl+c in the terminal) and see the logs, or send it us. If there are many Removing entries from LRUCache, you can increase your cache size with cache_size_mbs in the config.yml (the default value is 50). But I don't think that is occured. Let me check if there is another way to optimize the home page

VegethB commented 2 years ago

For a slow home page, did you turn on a config cache_enable?

The cache is already active from the "beta" (PR build). In fact, it now loads the library almost instantly (even on startup).

image (from #186 )

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). Here, the best is by switching to the database. I assume it reduces the reading of all this metadata to a few seconds. Being data that must always be updated every time a chapter is added or read.

Would you change log level to debug at confug.yml? and run mango with a command ./mango > log.txt in a terminal to save logs. after trying to access by tachiyomi and waiting some minutes (maybe 2 minutes?), turn off the mango (ctrl+c in the terminal) and see the logs, or send it us.

As soon as I finish the full backup of the tablet nand, I do this test and log in 👍 (128gb backup 😭😅 but I have to do it because it has a serious firmware bug and I need a backup if something happens during the upgrade to 1.01 and other messes of having the 1.00 with root). If I can restart the old tablet in the meantime, I try that one.

VegethB commented 2 years ago

@Leeingnyo Video: https://mega.nz/file/wsUkyLQT#P8Lmq_1GIas8T0pSDgYIBDKU7aT_SP0vEgu-tfIaye0 The > log.txt didn't write to me in the WSL console so I didn't know if it started or not 😅

Log: log.txt

Leeingnyo commented 2 years ago

@zFerry98 Thank you for sharing! There is no problem with cache. I agree that we need to move metadata to a DB someday. After implementing a login api, tachiyomi timeout would be resolved.

hkalexling commented 2 years ago

@Leeingnyo @zFerry98 Thank you both for testing! Yes I forgot that the extension loads / when signing in :facepalm:

Before we release a new version of Mango with the authentication API, an easy workaround would be to access /img/icon.png (the Mango icon) for authentication. I will work on this.

VegethB commented 2 years ago

an easy workaround would be to access /img/icon.png

if you are referring to the login (of the extension), if you enter anything after the /

it outputs this error: ![image](https://user-images.githubusercontent.com/17975351/135027649-5d6bc145-9b9c-48f0-96a5-a1974831f581.png) ![image](https://user-images.githubusercontent.com/17975351/135027910-110ddaea-8c95-42be-a245-22bbd51b0a21.png) ![image](https://user-images.githubusercontent.com/17975351/135027703-02ec63d6-9090-4af4-91ab-e89786d09797.png)

I had already tried this workaround but it doesn't work on the ext.

From the PC it is a completely different story. I have always used the variant "http://192.168.1.2:25570/library" and therefore the home has become a distant memory 😂

hkalexling commented 2 years ago

@zFerry98 No I mean I will update the extension so it uses something other than / (e.g., the icon) to authenticate the user. Please wait for the update and you don't need to config anything.

VegethB commented 2 years ago

@Leeingnyo @zFerry98 Thank you both for testing! Yes I forgot that the extension loads / when signing in 🤦

Before we release a new version of Mango with the authentication API, an easy workaround would be to access /img/icon.png (the Mango icon) for authentication. I will work on this.

In the end, my "timeout" error, was it triggered by the home very slow to load? As soon as you open the extension shouldn't it load the library? (otherwise I can't explain why he sometimes went and loaded the manga list 🤔).

Leeingnyo commented 2 years ago

@zFerry98 the timeout would be bypassed! for now, the extension tries to access /. since not authenticated, it redirects to login page. after login, the Mango sends the extension to a home page where it wish to access (a cause of timeout). so, we will change the extension to access to /img/icon.png for checking an authentication, which sends the extension to the icon, not a home page, after login! and would go well (loading manga list, etc.). we could avoid slow home which doesn't need for the extension actually in this way.

hkalexling commented 2 years ago

I was trying to do the icon.png trick but realized that the images files are not password protected by design, so we can't use them for authentication. We will have to wait for the next release with the authentication API to resolve the timeout issue. Sorry for the trouble!

GlassedSilver commented 2 years ago

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:

Webtoons
\\Some Webtoon
\\.\\chapter 1.cbz
\\Another Webtoon
\\.\\chapter 1.cbz

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 ;)

hkalexling commented 2 years ago

@GlassedSilver sorry for the long delay.

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.

I am not sure I understand what you mean by the last folder here. Can you elaborate more (maybe with an example?)

GlassedSilver commented 2 years ago

@GlassedSilver sorry for the long delay.

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.

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:

Screenshot_20211031_035413_eu kanade tachiyomi debug Screenshot_20211031_035526_eu kanade tachiyomi debug