2020-03-12, 01:34
(2020-03-11, 21:16)Lunatixz Wrote:ok, i have figured something out.(2020-03-11, 20:06)Tony5856 Wrote:I think I spotted your issue... you're converting your "dict" into a "list"? missed that before; in the examples you are reviewing (pluto.tv) I'm serializing a generator object. If your sudo code is the actual item then its a dict and should not be converted into a list.(2020-03-10, 22:32)Lunatixz Wrote: With the limited info provided, I'm not sure what the issue is; however, it's not a uEPG issue.... rather how it's being implemented. You can post a GitHub link to your project, when I'm free I can take a look.
Hmm, I’ve used the same format as the example you’ve given for the guide data and posted the call I’ve made to the uepg module. I’ve also looked at your Pluto tv addon and copied a snipet of guide data generated by the addon, knowing it works, and tried that also with no luck. I guess I can put my test addon on github and post a link. Thank you for the reply.
change:
to:python:xbmc.executebuiltin("RunScript(script.module.uepg,json=%s&refresh_path=%s&refresh_interval=%s)"%(urllib.quote(json.dumps(list(Guide_Data))),(sys.argv[0]+"?mode=1"),("7200")))
python:xbmc.executebuiltin("RunScript(script.module.uepg,json=%s&refresh_path=%s&refresh_interval=%s)"%(urllib.quote(json.dumps([Guide_Data])),(sys.argv[0]+"?mode=1"),("7200")))
xbmc.executebuiltin("RunScript(script.module.uepg,json=%s&refresh_path=%s&refresh_interval=%s)"%(urllib.quote(json.dumps([Guide_Data])),(urllib.quote(sys.argv[0]+"?mode=1")),("7200")))
This worked for me. I was using urllib.quote_plus previously and was getting an error saying
File "C:\Users\hoise\Desktop\Kodi blank\Kodi\portable_data\addons\script.module.uepg\uepg.py", line 87, in prepareJson
channelItems.sort(key=lambda x:x['channelnumber']) #todo user option sort by chnum or chname or backend default
AttributeError: 'str' object has no attribute 'sort'
When i changed to urllib.quote, the epg screen came up. Thank you for helping me out, can't wait to use it now.
PS, I also added the urllib.quote before the refresh path.