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.
(2016-03-02, 09:28)Mike_Doc Wrote: [ -> ]Forgot to ask you about the cast defails call, can you tell me if this caches or not? In a recent update we added it to widget info and it seems there is a delay when in widget info on displaying the correct cast details i.e. it'll show the ones from the previous movie viewed in widget info and then some seconds later or more will update to the correct movie? Does it matter what is used in the call? i.e. would using the DBID improve the delay?

The data is cached but you will always have a little overhead for the python plugin interface....
Once in the cache it should show up within a second or maybe 2 (depends on system speed)
(2016-03-02, 13:26)Jayz2K Wrote: [ -> ]Well, just gave it a quick shot but it doesn't work.
Seems that the Keyboard popup entry is missing, or the getdirectory error ?.

You must use the same syntax as the normal skin settings, so providing the values in your skinsettings.xml file
That way you can also set the defaults with setting the optional attribute constantdefault="condition"

So, in skinsettings.xml:
<setting id="MyConstant" value="200" label="200" condition="" icon="" description="" constantdefault="true" />
<setting id="MyConstant" value="300" label="300" condition="" icon="" description="" />

And call the script:
RunScript(script.skin.helper.service,action=setskinconstant,setting=MyConstant,header=Width for Panel)

The includes file will be auto generated based on user selection and/or the defaults, no need for you to supply it.

If you want I can also add a prompt option so you supply some values and a way to enter manually, something like this:

<setting id="MyConstant" value="||PROMPTSTRING|||" label="300" condition="" icon="" description="" />
<setting id="MyConstant" value="||PROMPTNUMERIC|||" label="300" condition="" icon="" description="" />
(2016-03-02, 05:42)Edworld Wrote: [ -> ]Can't get metascore to pull on movies and opened ListItemMonitor.py and noticed that row 1319 says: WINDOW.setProperty("SkinHelper.MetaCritic.Score",result.get('Metascore',""))

Fixed ;-)
(2016-03-02, 04:12)Guilouz Wrote: [ -> ]Since I have updated to last git, duration on my widget doesn't work.

Can you give it a try with latest Git version ?
Hi Marcel,

Thanks once again for developing this amazing tool. I've been using the Skin Helper Service it in my personal mod. Just a quick question, I've noticed on your Git page you've dropped more awesome RottenTomatoes data, MetaCritics and others. Have these features already been pushed onto the Kodi repo. If not, what sort of timescale should we expect?

Cheers Wink
(2016-02-29, 12:42)sualfred Wrote: [ -> ]@Marcel

Just asking if you stil have the genre content provider thing on your list.

I kind of forgot what to do with this Angel

Was it an additional entrypoint for genres with a poster/fanart assigned from movies from that genre or for each genre a list of fanarts/posters ?

Something like ListItem.Property(fanart0), ListItem.Property(fanart1) etc ?
(2016-03-02, 21:43)Hustler1337 Wrote: [ -> ]Thanks once again for developing this amazing tool. I've been using the Skin Helper Service it in my personal mod. Just a quick question, I've noticed on your Git page you've dropped more awesome RottenTomatoes data, MetaCritics and others. Have these features already been pushed onto the Kodi repo. If not, what sort of timescale should we expect?

It's only added yesterday so would normally not hit the repo before a week or two.
That said, I squashed some annoying bugs today which might lead to an early repo push ;-)
(2016-03-02, 21:37)marcelveldt Wrote: [ -> ]
(2016-03-02, 13:26)Jayz2K Wrote: [ -> ]Well, just gave it a quick shot but it doesn't work.
Seems that the Keyboard popup entry is missing, or the getdirectory error ?.

You must use the same syntax as the normal skin settings, so providing the values in your skinsettings.xml file
That way you can also set the defaults with setting the optional attribute constantdefault="condition"

So, in skinsettings.xml:
<setting id="MyConstant" value="200" label="200" condition="" icon="" description="" constantdefault="true" />
<setting id="MyConstant" value="300" label="300" condition="" icon="" description="" />

And call the script:
RunScript(script.skin.helper.service,action=setskinconstant,setting=MyConstant,header=Width for Panel)

The includes file will be auto generated based on user selection and/or the defaults, no need for you to supply it.

If you want I can also add a prompt option so you supply some values and a way to enter manually, something like this:

<setting id="MyConstant" value="||PROMPTSTRING|||" label="300" condition="" icon="" description="" />
<setting id="MyConstant" value="||PROMPTNUMERIC|||" label="300" condition="" icon="" description="" />

Hehe, more clear now, missed the skinsettings.xml part :p This is going to be a large file Wink Really intuitive to work in this one.

Yeah, the ||PROMPTNUMERIC|| is what I need Smile
Not sure the ||PROMPTSTRING|| makes sense here since AFAIK constants are numeric only ... ?

Also, while you're on skin settings, I'm using this great stuff a lot also to just build a select box and use the <onselect> action. But in this case, the dummy string name writes a useless skinstring. Should it be possible to add a ||SKIPSTRING|| so it writes nothing ?
(2016-03-02, 21:07)marcelveldt Wrote: [ -> ]
(2016-03-02, 09:56)Jayz2K Wrote: [ -> ]I don't like to come with bad news but seems latest update 1.0.56 broke the "fileexists" feature.
It's been reported by users and tested it myself (after upgrading).

Should now be fixed on Git. Once confirmed I will push to the repo again.
Thx will report as soon as I have 5mins.
(2016-03-02, 21:47)marcelveldt Wrote: [ -> ]
(2016-03-02, 21:43)Hustler1337 Wrote: [ -> ]Thanks once again for developing this amazing tool. I've been using the Skin Helper Service it in my personal mod. Just a quick question, I've noticed on your Git page you've dropped more awesome RottenTomatoes data, MetaCritics and others. Have these features already been pushed onto the Kodi repo. If not, what sort of timescale should we expect?

It's only added yesterday so would normally not hit the repo before a week or two.
That said, I squashed some annoying bugs today which might lead to an early repo push ;-)

Nice Big Grin No worries Marcel, no rush. We've always got Github to get your cutting edge updates Big Grin
(2016-03-02, 21:46)marcelveldt Wrote: [ -> ]
(2016-02-29, 12:42)sualfred Wrote: [ -> ]@Marcel

Just asking if you stil have the genre content provider thing on your list.

I kind of forgot what to do with this Angel

Was it an additional entrypoint for genres with a poster/fanart assigned from movies from that genre or for each genre a list of fanarts/posters ?

Something like ListItem.Property(fanart0), ListItem.Property(fanart1) etc ?

Yep, but with posters Smile 3 arts per ListItem are required on my side.
(2016-03-02, 21:07)marcelveldt Wrote: [ -> ]
(2016-03-02, 09:56)Jayz2K Wrote: [ -> ]I don't like to come with bad news but seems latest update 1.0.56 broke the "fileexists" feature.
It's been reported by users and tested it myself (after upgrading).

Should now be fixed on Git. Once confirmed I will push to the repo again.
Fixed Wink thx ...
Marcel for MoviSets Cast...some error to fix

PHP Code:
22:00:07 T:2436   ERRORXFILE::CDirectory::GetDirectory Error getting plugin://script.skin.helper.service/?action=getcast&movieset=James Bond Collection&downloadthumbs=true
22:00:08 T:3592   ERRORSkin Helper Service --> Error in plugin.py --> not all arguments converted during string formatting
22
:00:08 T:3592   ERRORTraceback (most recent call last):
22:00:08 T:3592   ERROR:   File "C:\Users\Lenovo\AppData\Roaming\Kodi\addons\script.skin.helper.service\plugin.py"line 115in <module>
22:00:08 T:3592   ERROR:     Main()
22:00:08 T:3592   ERROR:   File "C:\Users\Lenovo\AppData\Roaming\Kodi\addons\script.skin.helper.service\plugin.py"line 74in __init__
22
:00:08 T:3592   ERROR:     plugincontent.getCast(movie,tvshow,movieset,episode,downloadthumbs)
22:00:08 T:3592   ERROR:   File "C:\Users\Lenovo\AppData\Roaming\Kodi\addons\script.skin.helper.service\resources\lib\PluginContent.py"line 1070in getCast
22
:00:08 T:3592   ERROR:     json_result getJSON('VideoLibrary.GetMovieSets''{ "properties": [ "title" ] }' %movieset.encode("utf-8"))
22:00:08 T:3592   ERRORTypeErrornot all arguments converted during string formatting 
(2016-03-02, 23:10)Angelinas Wrote: [ -> ]Marcel for MoviSets Cast...some error to fix

Should now be fixed
Nop , have error
PHP Code:
23:25:16 T:2596   ERRORSkin Helper Service --> Error in plugin.py --> 'movies'
23:25:16 T:2596   ERRORTraceback (most recent call last):
23:25:16 T:2596   ERROR:   File "C:\Users\Lenovo\AppData\Roaming\Kodi\addons\script.skin.helper.service\plugin.py"line 115in <module>
23:25:16 T:2596   ERROR:     Main()
23:25:16 T:2596   ERROR:   File "C:\Users\Lenovo\AppData\Roaming\Kodi\addons\script.skin.helper.service\plugin.py"line 74in __init__
23
:25:16 T:2596   ERROR:     plugincontent.getCast(movie,tvshow,movieset,episode,downloadthumbs)
23:25:16 T:2596   ERROR:   File "C:\Users\Lenovo\AppData\Roaming\Kodi\addons\script.skin.helper.service\resources\lib\PluginContent.py"line 1073in getCast
23
:25:16 T:2596   ERROR:     moviesetmovies result['movies']
23:25:16 T:2596   ERRORKeyError'movies'
23:25:16 T:3288   ERRORXFILE::CDirectory::GetDirectory Error getting plugin://script.skin.helper.service/?action=getcast&movieset=Despicable Me Collection&downloadthumbs=true