Glagan / SyncDex

Automatically sync what you read on MangaDex across many services like MyAnimeList, Anilist, Kitsu and more.
Mozilla Public License 2.0
46 stars 0 forks source link

[BUG] highlighting/ logging when reseting counter #21

Closed zivoy closed 3 years ago

zivoy commented 3 years ago

Describe the bug when a series resets the counter on every volume, the highlighting tends to get weird. it also has problems when recording to some platforms

To Reproduce Steps to reproduce the behaviour:

  1. a any series that has a reseting counter like: https://mangadex.org/title/9734
  2. set your progress to something like Vol. 2 Ch. 12
  3. Scroll down the page and see that it is higlighting to chapter 12 on volumes 1 and 2 3.2. if you go to anime-planet it reqords it in a continuous numbers, so when you set to Vol. 2 Ch. 12 it records it as 12 instead of 68

Expected behavior (optional) All chapters below the selected chapter should be highlighted even through volumes, and it should record the corect number on AP

Screenshots image

Browser Firefox 84.01 (64 bit) Options and logs

{"logs":[{"d":1609093429548,"msg":"Installation version 0.1.5"},{"d":1609093792606,"msg":"Title.link is an abstract function"},{"d":1609093815926,"msg":"Title.link is an abstract function"},{"d":1609093878323,"msg":"Title.link is an abstract function"},{"d":1609094405981,"msg":"Title.link is an abstract function"},{"d":1609151724636,"msg":"Title.link is an abstract function"},{"d":1609152056030,"msg":"Title.link is an abstract function"},{"d":1609152228749,"msg":"Title.link is an abstract function"},{"d":1609152242675,"msg":"Title.link is an abstract function"},{"d":1609179711686,"msg":"Updating from version 0.1.5 to 0.1.6"},{"d":1609266639798,"msg":"Updating from version 0.1.6 to 0.1.7"},{"d":1609345208826,"msg":"Error on request [https://mangadex.org/api/v2/user/me/manga/49366]: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"},{"d":1609346628129,"msg":"Error on request [https://mangadex.org/api/v2/user/me/]: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"},{"d":1609347193593,"msg":"Error on request [https://mangadex.org/api/v2/user/me/]: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"},{"d":1609353041179,"msg":"Updating from version 0.1.7 to 0.1.8"},{"d":1609551978045,"msg":"Updating from version 0.1.8 to 0.1.9"},{"d":1609556176779,"msg":"Could not sync MangaUpdates: status 0"},{"d":1609556180058,"msg":"Could not sync AnimePlanet: status 0 token true"},{"d":1609556180059,"msg":"Could not sync MyAnimeList: status 0 csrf true"},{"d":1609556180062,"msg":"Could not sync MangaUpdates: status 0"},{"d":1609556184037,"msg":"Could not sync AnimePlanet: status 0 token true"},{"d":1609556207255,"msg":"Could not sync MangaUpdates: status 0"},{"d":1609556210705,"msg":"Could not sync AnimePlanet: status 0 token true"},{"d":1609556210706,"msg":"Could not sync MyAnimeList: status 0 csrf true"},{"d":1609556210706,"msg":"Could not sync MangaUpdates: status 0"},{"d":1609556246363,"msg":"Could not sync AnimePlanet: status 0 token true"},{"d":1609556373940,"msg":"Could not sync MangaUpdates: status 0"}],"options":{"hideHigher":false,"hideLower":true,"hideLast":true,"highlight":true,"groupTitlesInLists":true,"thumbnail":true,"originalThumbnail":false,"progressInThumbnail":true,"thumbnailMaxHeight":80,"separateLanguages":true,"favoriteLanguage":"all","saveOpenedChapters":true,"chaptersSaved":100,"saveOnlyHigher":true,"saveOnlyNext":false,"confirmChapter":true,"updateOnlyInList":true,"iconsSilentAfterSync":true,"linkToServices":true,"overviewMainOnly":true,"autoSync":true,"mdUpdateSyncDex":false,"biggerHistory":false,"chapterStatus":false,"notifications":true,"errorNotifications":true,"useMochi":true,"acceptLowScore":false,"updateMD":false,"checkOnStartup":false,"checkOnStartupMainOnly":true,"checkOnStartupCooldown":30,"silentUpdate":false,"services":["ap","mal","mu"],"mainService":"ap","noReloadStatus":true,"tokens":{},"colors":{"highlights":["rgba(28, 103, 141, 0.8)","rgba(22, 65, 87, 0.8)","rgba(28, 135, 141, 0.8)"],"nextChapter":"rgba(199, 146, 2, 0.4)","higherChapter":"transparent","lowerChapter":"rgba(180, 102, 75, 0.4)","openedChapter":"rgba(28, 135, 141, 0.4)"},"version":0.1,"subVersion":9}}

Additional context N/A

Pancakes0 commented 3 years ago

do you mean that it should be like lets say: https://mangadex.org/title/31477/solo-leveling where its organized? Screen Shot 2021-01-02 at 7 37 25 PM

Glagan commented 3 years ago

Hi, well, first of all, it's an horrible way to sort chapters if I'm honest (resetting chapter each volumes) and I don't know if I can do anything about that.
The chapter count seem to be broken on MangaDex itself, it has a maximum of 57 for MangaDex list while AnimePlanet lists at least 188.

I count using chapters on AnimePlanet, because that's the one that make most sense (you can only count by using volumes OR chapters on AnimePlanet), and 99% of titles on MangaDex are also using chapters.

To "fix" the problem here I would need to know if a title is using this method (counting by volume) and need to know the amount of chapters for each volumes, which can't be easily known on each pages and it would be broken in some of them.

Your best solutions here is to either report it on MangaDex to fix it, or contact the translation teams to fix what they are doing.
Sorry about that.

Glagan commented 3 years ago

I detect Titles that count like that in 0.2.3.

The chapter list is updated and it should be transparent (in Title page and in Chapter list pages), only the chapter list while reading is not updated and there is a warning.

It should work and be enough for most titles, but if you find one with weird chapters please post a link so I can test it, these are hard to found (well, at least I didn't find any).

The only bug I know of and I'm not sure if I want to fix is when there is a chapter with a new volume while your save is outdated and has an incorrect chapter count for the previous volume, if you're in a chapter list page.
I could detect that and send a request to the API to update it, but I prefer to have sending requests, if you think it's actually more common than I think I'll fix it.