Plugin my_anime_list, URL JSON result maxed at 300 entries.
See original GitHub issueExpected behaviour:
For the Plugin: my_anime_list to return the requested categories, preferably with less traffic overhead.
Actual behaviour:
The URL JSON result returns the first 300 results of ALL categories in order of status id. This is a limitation of the JSON url used and not a bug in the flexget plugin code.
Steps to reproduce:
- Step 1: Have more than 300 listed anime on the site, in any given category.
- Step 2: Request a category that is sorted last in the JSON result, like “plan_to_watch”.
- Step 3: If you have more than 300 anime listed as “Completed” or “Dropped”, the JSON result would never load the “plan_to_watch” entries.
Config:
my_anime_list:
username: <removed>
status:
- watching
- plan_to_watch
Log:
(click to expand)
na
Additional information:
The JSON source used in the plugin, only gives the first 300 results from MAL. (https://myanimelist.net/animelist/flexget/load.json) This is not an issue if you use “watching” as they are sorted first in the JSON reply, but “plan_to_watch” that many use is sorted last, after categories like “completed” and “dropped”.
Solutions: It’s possible to specify what result you want in the URL but only for a single status id. If it merged multiple status specific JSON results, it would probably require less traffic than the current parameterless “load.JSON”, as most users just want status “1” & “6”. Ex. Status 6 is “plan_to_watch” only: https://myanimelist.net/animelist/flexget/load.json?status=6
It’s also possible to offset the result by a given amount, but would require merging large lists until an empty result is given “[]”. Ex. JSON results from 300->600: https://myanimelist.net/animelist/flexget/load.json?offset=300
Alternative solution: From what i read, Load.JSON is an internal tool for loading lists and is not meant to be used as an API. There is a new API, but it appears to require an authorization token to use and it’s in beta: API auth: https://myanimelist.net/apiconfig API doc.: https://myanimelist.net/apiconfig/references/api/v2
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Good to hear it worked. The change isn’t implemented yet, it’s still an Open Pull Request. It should go live up to 24h after approval, but that can take a while, depends on the team members availability.
Easiest way to test in my opinion would’ve been navigating to the virtual-env of your install and overwriting that one file. But as you found out, there’s more than one way to peel that egg, so whichever one works for you should be fine 😝.
TBF, it’s an input, API would be overkill since we’re just reading. So much so that the plugin used to scrape the webpage before being rewritten to use the JSON 😅.
Good info with the parameters though, if there’s no PR until later in the week I might give it a go 😃