Great idea for additional sorting options in MediaListCollection and issues in the current ones
Hey, I would like to give feedback on MediaListCollection.
I noticed that it isn't currently possible to get list order SAME as in someone's profile. And I am talking about list order not order of entries in lists. If someone has dropped (at the top) -> watching -> completed i can't get that order in API.
The second thing is that when I sort something by example MEDIA_ID it doesn't sort entries inside but everything. So if I have mediaid : 1 on my dropped list it will result in dropped list being first in json result.
Solution: -Add USER_ORDER sort to MediaListCollection - to get lists in order that someone has on their profile. Should be possible somehow as we are providing userID to query for it in the first place.
-Add same sort options to entries themselves - to sort entries order, not everything. This is deeply connected with the first problem I mentioned. It would make so much more sense to additionally have those. Optionally remove those in MediaListCollection/Replace them.
The problems are kinda API-only problems. As it won't be necessary to implement all of that for website too. I know it is technically possible for me to sort entries inside lists correctly. But I can't get the order of lists same as website from top to bottom.
I hope to get an answer on that :)
While you can't make the lists themselves come back in the user-sorted order from the API, you can query for the user sort order in the same query by adding
MediaListCollection {
lists {
...
}
user {
mediaListOptions {
animeList {
sectionOrder
}
mangaList {
sectionOrder
}
}
}
}
to your MediaListCollection query and then sort the lists in code based on the results. I hope that helps you accomplish your goal!
While you can't make the lists themselves come back in the user-sorted order from the API, you can query for the user sort order in the same query by adding
MediaListCollection { lists { ... } user { mediaListOptions { animeList { sectionOrder } mangaList { sectionOrder } } } }to your
MediaListCollectionquery and then sort the lists in code based on the results. I hope that helps you accomplish your goal!
Thank you for response, it's helpful but doesn't take to the account custom lists. It would work with only original lists. I might use this method but it doesn't solve the problem entirely
doesn't take to the account custom lists. It would work with only original lists.
Weird... when I query myself I get all my custom lists in the results as well. Seems it at least does not work very consistently 🤣

doesn't take to the account custom lists. It would work with only original lists.
Weird... when I query myself I get all my custom lists in the results as well. Seems it at least does not work very consistently 🤣
Try this query
query { MediaListCollection(userId: 5559348, type: ANIME, sort: MEDIA_ID) { lists { name isCustomList isSplitCompletedList status entries { id media { id episodes title { userPreferred } coverImage { large } } progress status score } } user{ mediaListOptions{ animeList{ sectionOrder } } } } }
My test profile : https://anilist.co/user/animeziotest/animelist with a custom list named "Customlist" I don't see it in a result
EDIT: Well I see it in medialistCollection but not in this sectionOrder
I believe this is because you haven't set an order to your lists since you added that custom list. I tested it on my own profile as well by added three new custom lists without saving a new custom order, and it seems that it first displays all of the lists that it has a custom order for, and then adds on all of the remaining custom lists at the end in some default order (it appears to be based somehow on the anime contained in the list since I added three new lists and was switching around what anime were in them and it was changing the order they were displayed on my profile).
If you edit the order of your lists and save it, I believe that your custom list would start to appear in the api results.
It appears now, very weird. What if somebody doesn't change the order? Will it eventually be in result or not?
If they don't set a custom order, then it seems the order is up to whatever default logic Anilist has, and the lists will not appear in the api results for list ordering settings. For what it's worth, I had a custom list that I deleted a few months ago, but never updated my list ordering afterwards, and it was still appearing in the api results for the list ordering settings today until I saved a new list ordering. So it seems that it will never automatically update.
I'm gonna use this, because it will work. It's kinda an issue it will not update automatically, but thank you so much nonetheless.
It should still be considered to be implemented in API
Also deleting a custom list works instant. It removes it from sectionOrder. This should be the same for adding one