2023-01-02, 05:22
image wouldnt work as they load earlier i think..
But, I could have my service checking the current position
print(xbmc.getInfoLabel('Container.FolderPath')) # plugin://plugin.video.nz.freeview/?_=live_tv
print(xbmc.getInfoLabel('Container().NumItems')) # 29
print(xbmc.getInfoLabel('Container().CurrentItem')) # 7
So, if the CurrentItem gets greater than 80% of NumItems, it could load more I guess.
The addon would tell the service what Path it's active for and what callback to call once it hits the number.
Last bit is adding the new items to the current list (if possible)
Unless I "fake it".
Cache the current items, then fetch new ones and just recreate the list and make sure to select the previous position...
Have tried and works pretty well.
Except can't work out a good reliable way to select the position on the list after it loads again.
UPDATE:
Kodi will automatically select the previous listitem (based on it's PATH) if the plugins path is the same as previously.
So, it is possible and here is a quick demo:
But, I could have my service checking the current position
print(xbmc.getInfoLabel('Container.FolderPath')) # plugin://plugin.video.nz.freeview/?_=live_tv
print(xbmc.getInfoLabel('Container().NumItems')) # 29
print(xbmc.getInfoLabel('Container().CurrentItem')) # 7
So, if the CurrentItem gets greater than 80% of NumItems, it could load more I guess.
The addon would tell the service what Path it's active for and what callback to call once it hits the number.
Last bit is adding the new items to the current list (if possible)
Unless I "fake it".
Cache the current items, then fetch new ones and just recreate the list and make sure to select the previous position...
Have tried and works pretty well.
Except can't work out a good reliable way to select the position on the list after it loads again.
UPDATE:
Kodi will automatically select the previous listitem (based on it's PATH) if the plugins path is the same as previously.
So, it is possible and here is a quick demo: