-
Notifications
You must be signed in to change notification settings - Fork 28
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
Duplicate Mangas/chapters ID handling #112
Comments
I see no reasons why a chapter id would be duplicated. Different language but same ID? Website must be able to differentiate what to load therefore Haru plugin should compose an identifier using id and language to make it unique anyway.
|
Oh interresting unit test that i should add in SAM |
Error is throwed in node_modules/svelte/internal/index.mjs.
Both i guess. Error occurs because engine dont filter duplicate chapters, but UI should have be cleaned after we switched manga. |
That's because i'm using a unique key identifier: |
You're not wrong, its the website that is wrong ofc. Nonetheless, maybe something can be done to clean MedialistItem list UI (or whatever you call it) when changing manga (like, force remove spinner??) Or remove spinner in case of error when fetching chapters? not sure if this one is easily catchable. |
The only way to not get the internal svelte to crash is to dedupe the list. |
I think the answer is obvious. If the chapter id is the same, it means links leads to the same resource. Even if the link set a cookie for language and link to the same chapter (url) but displayed differently according to the cookie then it should be treated as 2 different chapters, Haruneko should generate 2 different ID. If its the same ID, then those are identical, there is no reasons to display 2.
We are talking about identical ID, referencing the same resource. In other words we are creating a workaround for a website error. I see no harm in arbitrarily choosing any of them, being the first or the second, as long as we stick to our choice. |
T = Title, L = Link T1/L1 + T1/L1 = Same
T1/L1 + T1/L2 = different target but cannot have same name (would create the same folder).
T1/L1 + T2/L1 = same target but different name.
|
Case : https://w31.holymanga.net/manga-list/page-331/ It ends the Manga list loop 🤷 A whole page of dupe manga |
Those will get unique id anyway, so its not a filtering problem but a download sanitizing problem And ofc there is the issue of recognizing duplicate folders like that in UI, since we display downloaded folders i think, idk?
Ultimately if target is the same, its the same content. I see no use case where the content behind would be different with the same url. If its different content (like, url is the same but there is a dataset parameter on the link for different language idk, and script put a cookie idk before redirecting) then the plugin have to generate an unique identifier no matter what |
I suppose we can code a default filtering after FetchMangas & FetchChapters in the engine? Something that could be overwritten for particular websites. As decorator functions maybe? idk My point is :
|
Is it possible to use the item (object reference) itself as identifier instead of its ID?
|
There are other places as well, e.g. in Bookmarks.
It is a valid use case to have duplicate Identifiers in bookmarks (a user may have the same manga bookmarked from different websites which are using the same path style, such as seen in various WordPressMangaStream websites). |
Looks like it's valid (tested it quickly on the tutorial)
|
Case : https://raw.senmanga.com/mou-hatarakitakunaindesu-boukensha-nanka-yamete-yaru-imasara-taiguu-wo-kaerukara-to-onegai-sarete-mo-okotowaridesu-boku-wa-zettai-hatarakimasen
Its not caused by a bad CSS selector in Haru.
There are 2 chapters 3.1, with the same id.
When selecting the manga it cause errors, spinning stays, and subsequent click on others mangas keeps the spinning thingie, chapters are added BELOW IT
The text was updated successfully, but these errors were encountered: