I did put this up on the Kodi forums - but this seems like the right place. The Kodi RPC API will return episodes roughly in series/episode order providing that's the order they were scanned in.
If you add other episodes to the library after that - the RPC API will return them at the end of the search.
It looks like modifying the next episode command to sort by episode works and it'll sort everything into the right places (including specials with the specialsort values set).
I did put this up on the Kodi forums - but this seems like the right place. The Kodi RPC API will return episodes roughly in series/episode order providing that's the order they were scanned in.
If you add other episodes to the library after that - the RPC API will return them at the end of the search.
It looks like modifying the next episode command to sort by episode works and it'll sort everything into the right places (including specials with the specialsort values set).