Best way to reload pvr.iptvsimple addon?
#1
Options

1) 
xbmc.executeJSONRPC('{"jsonrpc":"2.0","id":1,"method":"Addons.SetAddonEnabled","params":{"addonid":"pvr.iptvsimple","enabled":false}}')
xbmc.executeJSONRPC('{"jsonrpc":"2.0","id":1,"method":"Addons.SetAddonEnabled","params":{"addonid":"pvr.iptvsimple","enabled":true}}')

Works but will reset channel order, remove all groups etc

2)
addon = xbmcaddon.Addon('pvr.iptvsimple')
addon.setSetting('anything', 'anything')

This triggers the add-on to reload without destroying channel order etc.
However, you do get a 'PVR must reset' OK dialog.

I'm writing a new service add-on that will allow settings multiple playlists / epgs.
It will then periodically merge them all, output the new file and restart iptv simple client.
Reply
#2
I've also found toggling any PVR add-on (enabled or disabled) with make it refresh.
So, I could have a dummy PVR add-on that isn't actually used and just toggle it enabled to force PVR to refresh.
Feels a bit "hacky" though.

I see there is a demo pvr add-on though.

So, for now I use the below code to force a reload.

xbmc.executebuiltin('InstallAddon(pvr.demo)', True)
xbmc.executeJSONRPC('{"jsonrpc":"2.0","id":1,"method":"Addons.SetAddonEnabled","params":{"addonid":"pvr.demo","enabled":true}}')
xbmc.executeJSONRPC('{"jsonrpc":"2.0","id":1,"method":"Addons.SetAddonEnabled","params":{"addonid":"pvr.demo","enabled":false}}')
Reply
#3
OMG, what a hacky mess.
Reply
#4
@ksooo 

I agree.
Maybe a JSON API call for PVR refresh could be implemented?

Or some sort of endpoint in the PVR add-ons themselves?
eg: plugin://pvr.iptvsimple/reload
Reply
#5
Imo, the right approach is not to hack around missing addon features using "reload" and stuff, but to implement the feature in the addon itself.
Reply
#6
Do you mean in the pvr.iptvsimple add-on?

A lot of people don't restart KODI very often.
So maybe a feature for "Refresh every X" could be added to pvr.iptvsimple?

And even better if it only refreshes when no PVR channel is playing.
As refreshing seems to stop the currently playing channel.
Reply
#7
(2019-02-06, 22:49)matthuisman Wrote: Do you mean in the pvr.iptvsimple add-on?

A lot of people don't restart KODI very often.
So maybe a feature for "Refresh every X" could be added to pvr.iptvsimple?

And even better if it only refreshes when no PVR channel is playing.
As refreshing seems to stop the currently playing channel.
 Maybe something like this, yes.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Best way to reload pvr.iptvsimple addon?00