In Kodi 19, we have a nice way to play vod content, by using the catchup-id in the xmltv file. This isn't supported in Kodi 18, so I had to create some workarounds.
Initially, I've had implemented a templated url on the channel-level that could be filled in to play something from the EPG, like plugin://plugin.video.example/play/bbc1/airdate/{start}/{stop}. This didn't work correctly for multiple reasons:
The sys.listitem didn't contain enough information to fill in start and stop, so I need to combine it with xbmc.getInfoLabel
The xbmc.getInfoLabel is unstable, since it can't be something else then the item the user originally selected.
Later, I added another "hack" to hide the URL in the name of the program (I do this only in Kodi 18), and extract it when the from the sys.listitem when the user asks to play this trough a context emnu. This method is a lot more accurate, and is a lot less code.
The first implementation hasn't been removed until now, but no addon that we know of is using it. And they shouldn't, since it won't work in Kodi 19.
This has a few benefits:
Lots of code can be removed.
We don't need to write a specific channel cache json file every time we refresh anymore.
Cleaner API.
Without all this obsolete Kodi 18 code, there is less difference between a Kodi 18 or Kodi 19 version.
This also makes the vod attribute from the JSON-STREAMS format useless.
In Kodi 19, we have a nice way to play vod content, by using the
catchup-id
in the xmltv file. This isn't supported in Kodi 18, so I had to create some workarounds.Initially, I've had implemented a templated url on the channel-level that could be filled in to play something from the EPG, like
plugin://plugin.video.example/play/bbc1/airdate/{start}/{stop}
. This didn't work correctly for multiple reasons:sys.listitem
didn't contain enough information to fill in start and stop, so I need to combine it withxbmc.getInfoLabel
xbmc.getInfoLabel
is unstable, since it can't be something else then the item the user originally selected.Later, I added another "hack" to hide the URL in the name of the program (I do this only in Kodi 18), and extract it when the from the
sys.listitem
when the user asks to play this trough a context emnu. This method is a lot more accurate, and is a lot less code.The first implementation hasn't been removed until now, but no addon that we know of is using it. And they shouldn't, since it won't work in Kodi 19.
This has a few benefits:
This also makes the
vod
attribute from theJSON-STREAMS
format useless.