Tachiyomi: Kitsu tracking matches anime enties

Created on 29 Apr 2017  路  6Comments  路  Source: tachiyomiorg/tachiyomi

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

bug

Most helpful comment

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.

All 6 comments

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 馃槈)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NoodleMage picture NoodleMage  路  3Comments

farahnur42 picture farahnur42  路  3Comments

as280093 picture as280093  路  3Comments

Pepsyy picture Pepsyy  路  4Comments

MaryWeeb picture MaryWeeb  路  4Comments