Closed vesatoivonen closed 3 years ago
Looks really nice. The empty seasons are a problem. I made one possible solution for that in my latest commit. Not most efficient, we send extra requests to Yle, but seems to work at least. The problem was really bad for "Luottomies", only 2 seasons really, but there were around 6 empty ones.
Other problem I have seen is that episodes of wrong seasons are listed. For example check "Isä Matteon tutkimuksia".
Btw, where did you find that episode.hash sort method? It is not mentioned in the API documentation
I found episode.hash by investigating the requests made by the areena web client.
The web client gets it's seasons from an endpoint (https://areena.api.yle.fi/v1/series/
It is a bit of a shame that the external API has not been updated after its initial release. In the front page it says "Ylen API on julkaistu 6.5.2015. Ensimmäisessä vaiheessa sen avulla on mahdollista tehdä Areenan kaltaisia palveluita. ". Unfortunately phase two has never been released.
Maybe we could just ask nicely for updates?
I asked for updates from the API team. They finally responded, but with some bad news for this plugin. They are actually planning to limit the functionality on the external API and focus only in their internal API. There is no timeline yet so I don't know when these changes would happen.
First step for #42.
This splits series in seasons, if the season data is available through
series/items
. When used with the new sorting method,episode.hash
, episodes are usually ordered properly.Sometimes the season data is not available (Itse valtiaat, https://external.api.yle.fi/v1/series/items/1-50552097.json) and the old
list_series
is used as a fallback (episode.hash
sort works with that too). I haven't figured out what to do when the season data is littered with likely duplicates with mostly empty seasons (Summeri, https://external.api.yle.fi/v1/series/items/1-3826506.json).