The issue with kitsu tracking getting associated with the anime of the same id is still present. This is on a fresh install of 0.5.1, and the issue remains on 0.5.2
Version: v0.5.2
Let's see.
This is the search query:
https://kitsu.io/api/edge/manga?filter[text]=<manga title>
The API returns a list of manga and when one is selected, we then look for a possible existing entry in the user library:
https://kitsu.io/api/edge/library-entries?filter[media_id]=<media id>&filter[user_id]=<user id>&page[limit]=10000&include=manga
With the response from the previous request, we can know if the entry is not in the user library, in which case it's added with the following POST to https://kitsu.io/api/edge/library-entries:
{
"data": {
"type": "libraryEntries",
"attributes": {
"status": "current",
"progress": 0
},
"relationships": {
"user": {
"data": {
"id": "<user id>",
"type": "users"
}
},
"media": {
"data": {
"id": "<manga id>",
"type": "manga"
}
}
}
}
}
If it exists, we use PATCH to https://kitsu.io/api/edge/library-entries/<library entry id> with this content to update:
{
"data": {
"type": "libraryEntries",
"id": "<library entry id>",
"attributes": {
"status": "current",
"progress": 0,
"ratingTwenty": null
}
}
}
Is anything wrong here or did the API change recently?
on the library-entries request, you need a filter[kind]=manga. alternatively, use filter[manga_id] instead of filter[media_id]. I think the latter is probably better, as filter[kind] might go away in the future.
on the library-entries request, you need a filter[kind]=manga.
I thought &include=manga was already enough.
So filter[media_id] to filter[manga_id]? What about the include? Should it be removed?
馃憤 . yeah include won't affect which library entries are returned. it's just saying "if there are any attached manga, include those in the response as well."
Fixed in 3f758d5. Include is still required (I forgot why it was there).
The change I made last time was in:
"media": {
"data": {
"id": "<manga id>",
"type": "manga"
}
}
Where "type": "media" was replaced with "type": "manga". That's what I thought it was enough.
&page[limit]=10000 in library-entries?filter[media_id]=<media id>&filter[user_id]=<user id>&page[limit]=10000&include=manga is unnecessary, as there will only ever be 0 or 1 results when filtering by IDs (and its an invalid range 馃槈)
Most helpful comment
Fixed in 3f758d5. Include is still required (I forgot why it was there).
The change I made last time was in:
Where
"type": "media"was replaced with"type": "manga". That's what I thought it was enough.