Kodi Community Forum

Full Version: skin helper service
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok a bit more info here, I noticed that it has channel group id hardcoded to 1...so I decided to look in my local database and discovered this:

Image

I then changed it to "6" and that worked in that it now gets the channels but failed with this exception:

Code:
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: ('broadcastnow',)
                                            Traceback (most recent call last):
                                              File "C:\Users\Ian\AppData\Roaming\Kodi\addons\script.skin.helper.service\plugin.py", line 86, in <module>
                                                Main()
                                              File "C:\Users\Ian\AppData\Roaming\Kodi\addons\script.skin.helper.service\plugin.py", line 51, in __init__
                                                getPVRChannels(limit)
                                              File "C:\Users\Ian\AppData\Roaming\Kodi\addons\script.skin.helper.service\resources\lib\PluginContent.py", line 440, in getPVRChannels
                                                currentprogram = item['broadcastnow']
                                            KeyError: ('broadcastnow',)

I presume the above is because some of my channels do not have the current program correctly retrieved from the EPG provider.

No idea why my channel groupid for All Channels is 6...strange Smile
(2015-09-05, 14:57)marcelveldt Wrote: [ -> ]
(2015-08-22, 14:43)Jayz2K Wrote: [ -> ][quote='marcelveldt' pid='2086887' dateline='1440244518']
Gotta test this ASAP ! What a huge step forward for PVR ! Incredible Marcel ... incredible !

EDIT : Tested ... and it works ! Absolutly amazing !

I improved the PVR thumbs a bit. It's now also available in the window props.
Also added are some additional plugin entrypoints which provide the PVR channels and recordings including the thumbs/fanart.

See latest Git and the updated readme
Great Marcel, will give it a try.
Thanks.
(2015-09-06, 11:08)im85288 Wrote: [ -> ]Ok a bit more info here, I noticed that it has channel group id hardcoded to 1...so I decided to look in my local database and discovered this:

I presume the above is because some of my channels do not have the current program correctly retrieved from the EPG provider.

No idea why my channel groupid for All Channels is 6...strange Smile

OK, I'll fix it right away with adding a lookup for the channelgroup. For programs missing programinfo, I can either skip them or add them without info in the list...
I think skip is the best thing to do here
(2015-09-06, 11:08)im85288 Wrote: [ -> ]I presume the above is because some of my channels do not have the current program correctly retrieved from the EPG provider.
No idea why my channel groupid for All Channels is 6...strange Smile

Can you test with latest Git ?
I fixed the all channels issue and it now skips programs that are missing epg info
(2015-09-06, 11:19)marcelveldt Wrote: [ -> ]
(2015-09-06, 11:08)im85288 Wrote: [ -> ]I presume the above is because some of my channels do not have the current program correctly retrieved from the EPG provider.
No idea why my channel groupid for All Channels is 6...strange Smile

Can you test with latest Git ?
I fixed the all channels issue and it now skips programs that are missing epg info

Great that's fixed that, I have a few general queries though. The endtime does not seem to be accurate, start time seems to be missing ,channel numbers are not returned, the progress item is not filled, details on the next item is not present..ie. next title, next genre, next start time, next end time.

If all of those are not in scope of this widget then feel free to ignore these requests.
(2015-09-06, 11:34)im85288 Wrote: [ -> ]Great that's fixed that, I have a few general queries though. The endtime does not seem to be accurate, start time seems to be missing ,channel numbers are not returned, the progress item is not filled, details on the next item is not present..ie. next title, next genre, next start time, next end time.

If all of those are not in scope of this widget then feel free to ignore these requests.
Oh right, I still need to add those, totally forgot about that. Will add them asap.

EDIT: Now I remember why I didn't add details about the next program: Because it was really slow... The current query is 1 json request to get the channel including it's current program. Retrieving the next program would require to get the broadcasts for each channel individually.

If it's important I can add it, for example with a optional parameter to the script if next details should be included.

The starttime, channel number and progress should be no problem though
(2015-09-02, 18:54)marcelveldt Wrote: [ -> ]Two ways to resolve this:

1) I can add all the properties from the script to the listitem object. That way you can do wathever you want with the data in your skin. Downside is that you still need custom code in your skin for this widget.

2) I can "convert" the nextaired values into default listitem props, for example set the nextairing details in the plot, fill in the listitem.tvshowtitle etc. That way you can treat the widget's content like any other tvshow content and no special code required in your skin.

Tell me which one you'd like.

I can also go for the hybrid approach and have a combination of 1 and 2.

IMHO adding the properties from the script to the listitem object is the best way to go so when a skinner wants to use these it can be done the same way as before but without all the static content code.

I don't think the custom code is a problem. It's just a line of code in a variable plus that personally, i like to keep things separately in my code Wink

Cheers
Nessus
(2015-09-06, 11:38)marcelveldt Wrote: [ -> ]
(2015-09-06, 11:34)im85288 Wrote: [ -> ]Great that's fixed that, I have a few general queries though. The endtime does not seem to be accurate, start time seems to be missing ,channel numbers are not returned, the progress item is not filled, details on the next item is not present..ie. next title, next genre, next start time, next end time.

If all of those are not in scope of this widget then feel free to ignore these requests.
Oh right, I still need to add those, totally forgot about that. Will add them asap.

EDIT: Now I remember why I didn't add details about the next program: Because it was really slow... The current query is 1 json request to get the channel including it's current program. Retrieving the next program would require to get the broadcasts for each channel individually.

If it's important I can add it, for example with a optional parameter to the script if next details should be included.

The starttime, channel number and progress should be no problem though

Thanks, I did notice it was already significantly slower than getting the data direct from the database so adding the next program details would probably not be a good idea. For my purposes I will stick with the database version and use the auto thumb generator on a "on demand" basis. One possible improvement though would be to retrieve all channels if no limit parameter is specified (as it is now I think it returns 25 when not specified). Some cool stuff in there though, including the use of the logo database...nice work Smile
(2015-09-06, 10:23)marcelveldt Wrote: [ -> ]
(2015-09-06, 07:32)tomer953 Wrote: [ -> ]I quickly checked it [?action=getthumb] , and it worked... few weeks ago I checked it and it has some unicode errors or something that made the script faile. now its working.
but heres another unicode error: http://pastebin.com/Jt3wzcE7
some user send it to me so I can't actually test it myself, but he is using last git version since I push to my repo every change your publish.

and sorry about asking again,but I asked about the Program Addons,and you said it Fixed. I can't find a way to assign execute addons to widgets..

and Yesterday I tried to see what
Code:
[RunScript(script.skin.helper.service,action=conditionalbackgrounds)
does,so I write this line in onclick, and it opened a dialog with "add" option, that doesnt work (nothing happened when click)
and Today even the dialog don't open.. nothing happen..

1) Thanks for testing the unicode stuff. It's hard to test that when your language doesn't contain any special characters. The link with the error isn't working. Can you provide a new link ?

2) Please explain step-by-step what you mean because I don't understand. What is it that you're trying to accomplish with program addons and widgets ?

3) Conditional backgrounds feature should now be fixed on Git.

1. http://pastebin.com/Q5PWbtAV its a new link, but the old one is working to me...
2. OK, so Ill start from the basics.
Currently In kodi, I know two ways of creating "custom folders" that combine addons-stuff from diffrent places
a) Advanced Launcher
b) Super Favourites
for example, I can create in the AL addon a folder named "Tomer" and then assign to that folder links from other addons (I think its made by user favourites)
so lets said in the "Tomer" Folder Ill have "Youtube Most Popular" shortcuts, and "CNN News".
Finally, what users with to do, Is to assign that folder into a widget. That way, they can build a completly custom widget... by using one of those program addons.
In previous version of skinshortcuts, they can "get inside" program addons, and then inside the Advance Launcher addon, and then select their custom folder,
and the widget was filled by the items in that folder.
As I write this, I think of alternate way to acheive it - maybe Ill let them build their custom "folder" as a sub-menu, and then fill the widget with the sub-menu content, so no dependecy with the AL or Super Favourite to make custom widgets...

3. 10x
(2015-09-06, 13:11)tomer953 Wrote: [ -> ]2. OK, so Ill start from the basics.
Currently In kodi, I know two ways of creating "custom folders" that combine addons-stuff from diffrent places
a) Advanced Launcher
b) Super Favourites
for example, I can create in the AL addon a folder named "Tomer" and then assign to that folder links from other addons (I think its made by user favourites)
so lets said in the "Tomer" Folder Ill have "Youtube Most Popular" shortcuts, and "CNN News".
Finally, what users with to do, Is to assign that folder into a widget. That way, they can build a completly custom widget... by using one of those program addons.
In previous version of skinshortcuts, they can "get inside" program addons, and then inside the Advance Launcher addon, and then select their custom folder,
and the widget was filled by the items in that folder.

Super Favourites shows up under Video and Music add-ons, where the user can "get inside" the add-on. For program add-ons that have a plugin entry point, but don't define that as video/audio/picturest you can add custom support for it to your own <widget-groupings /> the same way support for the skin helper service has been added:-

Code:
<shortcut label="Advanced Launched" type="Label2 value" condition="System.HasAddon(whatever.advanced.launchers.id.is)">||BROWSE||whatever.advanced.launchers.id.is</shortcut>
(2015-09-06, 11:19)marcelveldt Wrote: [ -> ]Can you test with latest Git ?
I fixed the all channels issue and it now skips programs that are missing epg info

For PVR AeonMQ6 Working great.....This is all I need for EPG,I search this long time...Big TNX ,great script.

Image
(2015-09-06, 13:11)tomer953 Wrote: [ -> ]1. http://pastebin.com/Q5PWbtAV its a new link, but the old one is working to me...
2. OK, so Ill start from the basics.
As I write this, I think of alternate way to acheive it - maybe Ill let them build their custom "folder" as a sub-menu, and then fill the widget with the sub-menu content, so no dependecy with the AL or Super Favourite to make custom widgets...

1. The error is from old version. All those unicode errors have been fixed by me a few days back. So that error report from that user is from old version of the script. I know this because the line in the log doesn't match with the code.

2.Please check the answer from BobCratchet. That is the most solid way to fix it.
(2015-09-06, 12:45)im85288 Wrote: [ -> ]Thanks, I did notice it was already significantly slower than getting the data direct from the database so adding the next program details would probably not be a good idea. For my purposes I will stick with the database version and use the auto thumb generator on a "on demand" basis. One possible improvement though would be to retrieve all channels if no limit parameter is specified (as it is now I think it returns 25 when not specified). Some cool stuff in there though, including the use of the logo database...nice work Smile
Well, it's cached so the first request is slow but it will be faster in time. Offcourse a widget that points directly to the pvr:// path will be the fastest.

If you do not want a limit just set it to a ridiculous high number like 999.
(2015-09-06, 11:13)Jayz2K Wrote: [ -> ]
(2015-09-05, 14:57)marcelveldt Wrote: [ -> ]I improved the PVR thumbs a bit. It's now also available in the window props.
Also added are some additional plugin entrypoints which provide the PVR channels and recordings including the thumbs/fanart.

See latest Git and the updated readme
Great Marcel, will give it a try.
Thanks.
Gave it a quick shot. Seems now the new window properties arts works without the need of the multiimage control, which is a great thing. Seems also it works only in PVR windows, so still using the multiimage in my TV widget returns different image depending if I'm in the widget or PVR windows. Not a big deal but is there a way to get thoses properties also in widgets ?
Me too, I didn't notice the new window props and they work perfectly. Some great views can now be made using those poster/fanart values...what a script this is! Full of new surprises everyday Smile I think Live TV in Kodi has just stepped up it's game big time. Thanks again Marcel