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.
Hi Marcel,

I just noticed that using backup / export function returns empty guisettings.txt in zip when launching just after a KODI startup. The second one and others following are OK.
(2015-08-31, 09:21)Jayz2K Wrote: [ -> ]Hi Marcel,

I just noticed that using backup / export function returns empty guisettings.txt in zip when launching just after a KODI startup. The second one and others following are OK.

You mean on the first launch (fresh install) of Kodi ?
Or just if you have just launched Kodi ?
Hi Marcel, would it be possible to cache the Cast information so that subsequent requests for the data return instantly?
(2015-09-01, 21:13)marcelveldt Wrote: [ -> ]
(2015-08-31, 09:21)Jayz2K Wrote: [ -> ]Hi Marcel,

I just noticed that using backup / export function returns empty guisettings.txt in zip when launching just after a KODI startup. The second one and others following are OK.

You mean on the first launch (fresh install) of Kodi ?
Or just if you have just launched Kodi ?

Well, I'm not really sure now how it happens. It's finally not at each launch.
Maybe after a KODI update or skin.helper update. It acts like an init param you don't get at first time that returns an empty backup "[]" or incomplete one (1 or 2 strings instead of more than 20). Happened 2 or 3 times.

I have another issue now with the colorschemes backup. I'm using this :

Code:
<onclick>RunScript(script.skin.helper.service, action=backup, filter=Color)</onclick>

I'm asking myself if there's not a conflict with your theme feature. I can modify my colors using the color picker tool wihout problems but when exporting the scheme with the above command, it returns the previous unmodded scheme like if there was a memory setting. If I mod my theme, quit KODI, restart KODI and then export, it's fine (like memory clear ?).
(2015-08-29, 01:53)nessus Wrote: [ -> ]Now, with your dynamic list (using these) the 'TVShowTitle' is empty and the AirTime it shows only the long day of the week (i don't mind if is short or long)
and the the time but not the date. IMHO a separate aired date(including the day of the week) and aired time would be more efficient so every skinner
can use them in any way they like.

Also the <onclick> action is dead but as you can see in my code above it takes you to the root of the show in the library which is more user friendly.

Thanks for implementing this.

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.
(2015-09-02, 13:17)Jayz2K Wrote: [ -> ]Well, I'm not really sure now how it happens. It's finally not at each launch.
Maybe after a KODI update or skin.helper update. It acts like an init param you don't get at first time that returns an empty backup "[]" or incomplete one (1 or 2 strings instead of more than 20). Happened 2 or 3 times.

Hmmm, are you testing this on on Isengard or Jarvis ? From Jarvis something has changed in Kodi. the skinsettings are no longer stored in the guisettings.xml file in the userdata root but are now stored as a settings.xml in the addon_data\skin folder which is off course a way better implementation but I wonder if they've also changed the way when settings are written. Maybe the changes are only written at Kodi shutdown and not instantly... That would explain your issue.

The main problem is that the only way to retrieve all skin settings is to read the guisettings.xml (or in Jarvis the settings.xml) because there's no method to read the skin settings in the Kodi API.

EDIT: problem confirmed.. as of Kodi Jarvis, the settings are written to the xml file only at shutdown which makes the backupfunction pretty useless
(2015-09-02, 18:57)marcelveldt Wrote: [ -> ]
(2015-09-02, 13:17)Jayz2K Wrote: [ -> ]Well, I'm not really sure now how it happens. It's finally not at each launch.
Maybe after a KODI update or skin.helper update. It acts like an init param you don't get at first time that returns an empty backup "[]" or incomplete one (1 or 2 strings instead of more than 20). Happened 2 or 3 times.

Hmmm, are you testing this on on Isengard or Jarvis ? From Jarvis something has changed in Kodi. the skinsettings are no longer stored in the guisettings.xml file in the userdata root but are now stored as a settings.xml in the addon_data\skin folder which is off course a way better implementation but I wonder if they've also changed the way when settings are written. Maybe the changes are only written at Kodi shutdown and not instantly... That would explain your issue.

The main problem is that the only way to retrieve all skin settings is to read the guisettings.xml (or in Jarvis the settings.xml) because there's no method to read the skin settings in the Kodi API.

I'm only using Jarvis builds. I can try to build something and look at the xml file in the addon_data if it changes on the fly. Will report ...
(2015-09-02, 19:04)Jayz2K Wrote: [ -> ]I'm only using Jarvis builds. I can try to build something and look at the xml file in the addon_data if it changes on the fly. Will report ...

Sorry, I've just edited my post above... Problem confirmed while testing with Jarvis. The skinsettings are only written at Kodi shutdown.

http://forum.kodi.tv/showthread.php?tid=237583
(2015-09-02, 19:04)Jayz2K Wrote: [ -> ]
(2015-09-02, 18:57)marcelveldt Wrote: [ -> ]
(2015-09-02, 13:17)Jayz2K Wrote: [ -> ]Well, I'm not really sure now how it happens. It's finally not at each launch.
Maybe after a KODI update or skin.helper update. It acts like an init param you don't get at first time that returns an empty backup "[]" or incomplete one (1 or 2 strings instead of more than 20). Happened 2 or 3 times.

Hmmm, are you testing this on on Isengard or Jarvis ? From Jarvis something has changed in Kodi. the skinsettings are no longer stored in the guisettings.xml file in the userdata root but are now stored as a settings.xml in the addon_data\skin folder which is off course a way better implementation but I wonder if they've also changed the way when settings are written. Maybe the changes are only written at Kodi shutdown and not instantly... That would explain your issue.

The main problem is that the only way to retrieve all skin settings is to read the guisettings.xml (or in Jarvis the settings.xml) because there's no method to read the skin settings in the Kodi API.

I'm only using Jarvis builds. I can try to build something and look at the xml file in the addon_data if it changes on the fly. Will report ...
Damn you're right ... settings.xml is updated at KODI closing. Then I'm stuck with my backup feature :/
(2015-09-02, 19:16)Jayz2K Wrote: [ -> ]Damn you're right ... settings.xml is updated at KODI closing. Then I'm stuck with my backup feature :/

http://forum.kodi.tv/showthread.php?tid=237583
(2015-09-02, 19:19)marcelveldt Wrote: [ -> ]
(2015-09-02, 19:16)Jayz2K Wrote: [ -> ]Damn you're right ... settings.xml is updated at KODI closing. Then I'm stuck with my backup feature :/

http://forum.kodi.tv/showthread.php?tid=237583
Just saw it after my post. Thanks for the request.
(2015-08-29, 14:21)im85288 Wrote: [ -> ]Would you be able to add a few more listitems for displaying the formatted Studios, Genres and Cast?
So for example return studios as a string delimited by [CR], same for genres and for the cast

Done, see latest Git + readme.
(2015-09-02, 10:04)im85288 Wrote: [ -> ]Hi Marcel, would it be possible to cache the Cast information so that subsequent requests for the data return instantly?

Just fixed this on Git although I didn't test it. Please test to see if it works for you
(2015-09-02, 19:21)Jayz2K Wrote: [ -> ]Just saw it after my post. Thanks for the request.

In the meanwhile I implemented a little workaround which reloads the skin just before retirving the skin settings... I discovered that that triggers the write to the xml file.

So, the backup now works with Jarvis but you'll notice a quick flash of the screen while it's performing the backup
Please check the latest Git.
(2015-09-02, 20:23)marcelveldt Wrote: [ -> ]
(2015-09-02, 19:21)Jayz2K Wrote: [ -> ]Just saw it after my post. Thanks for the request.

In the meanwhile I implemented a little workaround which reloads the skin just before retirving the skin settings... I discovered that that triggers the write to the xml file.

So, the backup now works with Jarvis but you'll notice a quick flash of the screen while it's performing the backup
Please check the latest Git.
Thanks Marcel, backup works, however it crashes my skin (clears properties I use to process the dialogs and I get my strings init startup.xml looping).