[API] API returning erroneous "publishAt" dates for chapters hosted externally [Not a bug]

Status
Not open for further replies.
Fed-Kun's army
Joined
Jan 14, 2023
Messages
16
Ongoing series with chapters hosted externally (eg: One Piece, ChainsawMan, SPY x FAMILY, all on MANGA Plus) return an erroneous "2037-12-31T15:00:00+00:00" date.
Guess the year 2038 bug snuck it's ugly head into Mangadex ahead of schedule somehow :p
Also, seems like chapters prior to some date (presumably v5) are unaffected (eg: Naruto), hence "ongoing series".
 
Fed-Kun's army
Joined
Jan 14, 2023
Messages
16
For a live example, the following request:
Code:
GET https://api.mangadex.org/manga/a1c7c817-4e59-43b7-9365-09675a149a6f/feed?limit=1&translatedLanguage[]=en

Returns the following:
JSON:
{
    "result": "ok",
    "response": "collection",
    "data": [
        {
            "id": "eaa228bd-5965-49f1-8406-9575bfdde737",
            "type": "chapter",
            "attributes": {
                "volume": "23",
                "chapter": "208",
                "title": "Guardian Spirit",
                "translatedLanguage": "en",
                "externalUrl": "https://mangaplus.shueisha.co.jp/viewer/1004950",
                "publishAt": "2037-12-31T15:00:00+00:00",
                "readableAt": "2022-12-07T15:01:53+00:00",
                "createdAt": "2022-12-07T15:01:53+00:00",
                "updatedAt": "2022-12-08T21:05:18+00:00",
                "pages": 0,
                "version": 3
            },
            "relationships": [
                {
                    "id": "4f1de6a2-f0c5-4ac5-bce5-02c7dbb67deb",
                    "type": "scanlation_group"
                },
                {
                    "id": "a1c7c817-4e59-43b7-9365-09675a149a6f",
                    "type": "manga"
                },
                {
                    "id": "74d95af1-7492-4fca-bc44-10c9142703e8",
                    "type": "user"
                }
            ]
        }
    ],
    "limit": 1,
    "offset": 0,
    "total": 13
}

Note how it's just the "publishAt" that's being affected, all other dates seem to be fine.
 
Yuri Enjoyer
Staff
Developer
Joined
Feb 16, 2020
Messages
455
Our precious Xunder manages the MangaPlus bot these days, and puts the publishAt (ie readable directly in the MD reader) """forever""" in the future so that it stays an outlink (since there are no pages, you'd just get an empty chapter otherwise).

So yeah, it is a """feature""" in a sense, but mostly actually a hack of sorts. We're working on a proper state (in FSM meaning) for chapters to better deal with all these edge cases 😅
 
Last edited by a moderator:
Fed-Kun's army
Joined
Jan 14, 2023
Messages
16
Our precious Xunder manages the MangaPlus bot these days, and puts the publishAt (ie readable directly in the MD reader) """forever""" in the future so that it stays an outlink (since there are no pages, you'd just get an empty chapter otherwise).

So yeah, it is a """feature""" in a sense, but mostly actually a hack of sorts. We're working on a proper state (in FSM meaning) for chapters to better deal with all these edge cases 😅
A bit of a hack indeed. But I understand.
The reason I noticed this was due to magmadex.org, which I've been using as RSS bridge until RSS comes back to Mangadex proper, and has been using the Mangadex API "publishAt" for the RSS "pubDate", causing most RSS readers to never display the relevant chapters.
I'll try opening an issue on magmadex's github, hack or not I see now it might actually be more of a misinterpretation of the Mangadex API anyway - "readableAt" seems more appropiate. EDIT: Ended up making a PR instead
 
Last edited:
Yuri Enjoyer
Staff
Developer
Joined
Feb 16, 2020
Messages
455
If my memory serves right, readableAt was added much later, so it might be why magmadex didn’t use it at the time 🤔
 
Status
Not open for further replies.

Users who are viewing this thread

Top