keiyoushi / extensions-source

Source code of extensions for Tachiyomi/Mihon and variants.
https://keiyoushi.github.io/
Apache License 2.0
1.51k stars 351 forks source link

Updated parsing of manga title from URL. #59

Closed kooper100 closed 4 months ago

kooper100 commented 4 months ago

Checklist:

Closes #58

Tested by building apk and installing on my Samsung S23.

Screenshot_20240109_202829_Tachiyomi

FourTOne5 commented 4 months ago

Can you send an example url?

mage-goo commented 4 months ago

[I misread the code, never mind this]

mage-goo commented 4 months ago

Also, just fyi, I always encountered broken image and really slow image loading in general for madokami whenever I used DoH for some reason, so you might want to try to turning it off during development of this specifically

mage-goo commented 4 months ago

Ok, here's some edge case:

kooper100 commented 4 months ago

This will make some entries have obscenely long title, and isn't there a hard limits on Tachiyomi's title length? Also, it stops as soon as it encounters path that starts with exclamation mark, right? There's some entries that still continues even after that, will post example later. Also have you checked how this works with manga from search function? I think the href works different there And there's also the case of the old !Autouploaded from source folder with does have exclamation mark at the start

Not sure I understand why the title would be obscenely long? Can you explain if I'm missing something? It splits the url at each "/" and uses the last path segment that doesn't start with an exclamation, which from what I've seen should be the actual manga title.

Yes It stops when it encounters a path that doesn't have an exclamation point, but starting from the end. So it checks the last path segment like the extension currently uses, and then checks the previous path segment until it hits a path segment that doesn't start with an exclamation point. For example here it would check "!chapters" first, then "!(Digital) (danke-Empire)", then finally "Amagami-san Chi no Enmusubi" which it would use as the title. 2024-01-10_08-59-41_firefox

I have tested search and haven't seen any issues with this change.

Since the change is looking at the last path segment and each previous segment until it hits a path without an exclamation point I don't think !Autoupload would have an issue. Also I don't even see a "!Autoupload" folder, I only see "_Autouploads".

Also, just fyi, I always encountered broken image and really slow image loading in general for madokami whenever I used DoH for some reason, so you might want to try to turning it off during development of this specifically

Good to know, I'll keep it in mind. Thanks!

kooper100 commented 4 months ago

Ok, here's some edge case:

* [!Trap Oneshots](https://manga.madokami.al/Manga/Oneshots/%21Trap%20Oneshots) would show Oneshots as the name

* [Searching suki na ko megane](https://manga.madokami.al/search?q=suki+na+ko+megane) would result in 5 different entries but all have the same name and image, which is confusing to say the least. You won't be able to tell which is which from inside tachiyomi at all until you actually use the open in webview feature

Not sure I agree it's any more confusing than what is currently shown. You wouldn't even know what the manga is the way it currently works without opening webview.

Agree with the Oneshots though, not sure how to fix that yet.

kooper100 commented 4 months ago

Ok, here's some edge case:

* [!Trap Oneshots](https://manga.madokami.al/Manga/Oneshots/%21Trap%20Oneshots) would show Oneshots as the name (even thought it should have !Trap Oneshots)

* [Searching suki na ko megane](https://manga.madokami.al/search?q=suki+na+ko+megane) would result in 5 different entries but all have the same name and image, which is confusing to say the least. You won't be able to tell which is which from inside tachiyomi at all until you actually use the open in webview feature

Actually it doesn't look like any of those oneshots even show up in the extension currently anyway. I can't search or find them in tachiyomi using the current extension.

mage-goo commented 4 months ago

You wouldn't even know what the manga is the way it currently works without opening webview.

The manga detail processing still works and it uses the right cover for me somehow image

Not sure I agree it's any more confusing than what is currently shown

Yeah, fair, but the new way also doesn't seems to be ideal It just seems like there's a better way to do this but the other option like adding the sub-folder(s) name as suffix also seems like it got worse trade-off

kooper100 commented 4 months ago

You wouldn't even know what the manga is the way it currently works without opening webview.

The manga detail processing still works and it uses the right cover for me somehow image

Not sure I agree it's any more confusing than what is currently shown

Yeah, fair, but the new way also doesn't seems to be ideal It just seems like there's a better way to do this but the other option like adding the sub-folder(s) name as suffix also seems like it got worse trade-off

Do you use Tachiyomi main or a fork like J2K? I noticed that grabbing the image in search or latest manga list works in J2K but not in main. It's gets the image if you open the manga, but not in search or latest. Not sure if tachi main made some changes that removed that functionality while it remains in j2k?

I considered appending subfolders to the end of the title but I agree it would get messy for some manga. I could add it to the description or something in the manga details so you at least don't have to open it in webview?

mage-goo commented 4 months ago

ok here's the search that will "break" this

but I guess that doesn't really affect much, it'll just show entries with duplicate name but it seems to work fine when opened?

mage-goo commented 4 months ago

Do you use Tachiyomi main or a fork like J2K? I noticed that grabbing the image in search or latest manga list works in J2K but not in main.

I'm using main tachiyomi though still on 1.49, haven't updated it since this shenanigans began

I could add it to the description or something in the manga details so you at least don't have to open it in webview?

Oh, that sounds great, and while you're at it, if you could make the tags actually work as tags instead of description, that'd be great.

Though I think that would go out of the PR scope a bit, but eh

kooper100 commented 4 months ago

Added the subfolder to manga description and fixed tags to actually be tags instead of listed in the description.

Screenshot_20240110_174219_Tachiyomi

Screenshot_20240110_174240_Tachiyomi

mage-goo commented 4 months ago

lgtm 👍