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
#8
Hey guys,
I'm facing the same problem. I use a m3u list with pvriptvsimple addon.
When things change from time to time i need a playlist refresh. To force that I wrote simple batch file for Win10 which deletes tv32.db and then starts Kodi.
On Android I use Tasker and on RPI /LE cron or autostartscript.
That does it very well. As soon as something within the playlist changes now after a Kodi "restart" the changes are there.
The only annoying thing is the Channel Group Manager.
Can someone tell me in which file or database the PVR Manager stores it's data?
I want to get rid of the old group namings and only way to do that seems to be a full Kodi reset.
Deleting data with the button under TV settings has the same effect as my method with scripted deletion before Kodi starts.
Even editing a channel group name in the editor brings up the old name after a Kodi restart. What the heck this thing screws me really up!
I need to find a way to manually delete the Channel Group cache or database.
Then my thought was if it has something to do with estuary mod v2 but changing skin doesn't affect.
There must be something else.
Reply
#9
OK here's the "solution" for my above problem. Sometimes i'm stupid ^^... Checked that couple of times but between all the entries in the m3u file there where still a few that had simply the wrong group name.
So until kodi gets a manageable refresh feature I will keep doing it the rough way.
Reply
#10
I have a similar issue that im looking for an answer for.
Every time something changes on my playlist for a channel, the channel logo changes and order of the channel goes to the end in the group. It ignores taking the logo from the path provided in the m3u and takes it from a cache somewhere.
If i could know what DB to delete to refresh and use the logo provided by the m3u playlist would be great and also keep the order in the group.
I have tried to delete / rename: EPg11.db, Textures13.db and TV29.db

Thank you
Reply
#11
This is already implemented in the Matrix version of the addon.

https://github.com/kodi-pvr/pvr.iptvsimp.../README.md

Read the M3U auto refresh option.

Not possible in Leia version, a lot of work
had to be done to make it possible.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



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