v17 When are skin settings being saved?
#1
I tried to to post this in the Skins forum (Other Skins subforum) but I'm being denied access there (not sure why). However this applies to the RPi as well, so here goes.

Since upgrading to Kodi 17 (OpenElec 8.03 on RPi3) I've been battling with settings (especially skin settings) that do not survive a reboot. This seems to be a months-old issued that is being worked on, according to various posts and bug tickets. It seems to be more prevalent on the Pi than on other platforms but is not unique to it. So I've been trying to find a work-around by going into the settings files..

I'm using Xonfluence, which saves its settings in ~/.kodi/userdata/addon_data/skin.xonfluence/settings.xml (just like Estuary and Confluence do in their own subdirectories). But I'm noticing something strange. I just changed a bunch of settings, and the system time/date is currently Mon Aug 7 11:03:14 SAST 2017 (output of 'date' command). But the timedate stamp on the settings.xml file is Aug 6 12:32 (yesterday). I don't remember changing a setting yesterday at half pas twelve in the afternoon. I may have, but I don't think so.

So if I do a reboot now I'm going to loose all my setting changes again. Questions:
  • Are skin setting changes (for any skin) supposed to be saved immediately?
  • Do periodic writes to the skin's settings.xml take place at any other time? (the guisettings.xml file, for example, is updated every time a video stream terminates, if I understand it correctly).
  • Is there a way to force a skin to write its settings to the settings.xml file?
  • Does this have anything to do with the fact that the rPI mounts a bunch of virtual file systems in RAM from a flash disk image rather than physical file systems on an actual hard disk?
Any spark of enlightenment would be appreciated because this is driving me crazy... Tongue
Reply
#2
(2017-08-07, 11:23)frankvw Wrote: [*]Are skin setting changes (for any skin) supposed to be saved immediately?
[*]Do periodic writes to the skin's settings.xml take place at any other time? (the guisettings.xml file, for example, is updated every time a video stream terminates, if I understand it correctly).
[*]Is there a way to force a skin to write its settings to the settings.xml file?
[*]Does this have anything to do with the fact that the rPI mounts a bunch of virtual file systems in RAM from a flash disk image rather than physical file systems on an actual hard disk?
1. No
2. No
3. Yes. See below.
4. No.
Skin settings are saved on shutdown, on reloading the skin and on changing skin.
If your shutdown isn't clean they might well not be saved.
Easiest way to save them - switch to another skin, switch back.
More elegant - configure a shortcut to reload the skin - 'XBMC.ReloadSkin()' is the needed command.
Best - figure out what's going wrong with your shutdown. I've used xonfluence on a pi with openelec and libreelec since it first arrived (and CCM before that) - and I haven't had skinsettings disappear yet.

Saving skin settings is fairly straightforward these days (post-Isengard) so if you're having problems:
Go to userdata/addon_data/skin.xonfluence, and save a copy of the settings.xml file as eg userdata/addon_data/skin.xonfluence/savedsettings/settings.xml (so in a new subfolder)
If you lose your settings on reboot:
1. Switch to another skin
2. Go back to userdata/addon_data/skin.xonfluence
3. Delete settings.xml, copy your saved settings.xml back into the root of the folder
4. Switch back to xonfluence
You can do the above in kodi's file manager, via smb or probably half a dozen other ways.
Reply
#3
Quote:Are skin setting changes (for any skin) supposed to be saved immediately?
Generally, no. There are two ways to save changes in Kodi,
1. Exit Kodi using Kodi's own Exit option from the Power Menu
2. Change Skins. This forces a save before swapping skins.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#4
3. exiting settings area should also save your settings
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#5
(2017-08-07, 12:37)Martijn Wrote: 3. exiting settings area should also save your settings
It doesn't do that in krypton.
Reply
#6
Trogggy, once again you are my hero! Big Grin
(2017-08-07, 11:56)trogggy Wrote: Skin settings are saved on shutdown, on reloading the skin and on changing skin.
If your shutdown isn't clean they might well not be saved.
Easiest way to save them - switch to another skin, switch back. [...]

Aha. That explains it. The power button on my remote is intercepted by the OS and never reaches Kodi, so it's not a clean shutdown. I switched skins and that did indeed work. You, sir, rock!

However, this behavior differs from what I saw in Isengard. There the settings were saved upon leaving the skin settings menu.

Thinking about it, this would also explain why this issue seems to be more prevalent on the Raspberry Pi. Because it mounts a bunch of file systems in RAM from an image on an SD card, the typical way in which many (including, I have to confess, your's truly) shut down a Pi is to simply pull the power cord. Not the cleanest of shutdowns.

I'll try your other suggestions (including the XBMC.ReloadSkin() command) just now. But so far switching the skin as a way to force saving the settings is already major progress.

Thank you!!
Reply
#7
(2017-08-07, 12:37)Martijn Wrote: 3. exiting settings area should also save your settings

It hasn't don that since I upgraded to Kodi 17 (Krypton). It used to in Kodi 15 (Isengard), though. I skipped Kodi 16.

Not sure why this behaviour was changed. It it was changed deliberately, of course. If not, I think we'd have to consider this a bug rather than a feature. Laugh It's a bit a pain, though, especially on the Raspberry Pi which is typically left on 24/7 (no moving parts and 3W standby power consumption so why shut it down) and is generally rebooted by pulling the power cord.
Reply
#8
(2017-08-07, 18:34)frankvw Wrote: However, this behavior differs from what I saw in Isengard. There the settings were saved upon leaving the skin settings menu.
There was a pretty big change in behaviour between Isengard and Jarvis - skin settings used to be stored in guisettings.xml, from jarvis they've had their own settings.xml - which maybe was why they stopped being saved on exiting settings. That was a big improvement imo (makes it much easier to save / restore settings), but not saving on exit has probably caused a few problems for people.
Glad to help, anyway.
Reply
#9
Actually I found this on our github https://github.com/xbmc/xbmc/pull/7359#i...-214978674

Remember github is not for user support or discussions
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#10
We use Koying's patch: https://github.com/osmc/osmc/blob/master...ings.patch

Also: https://github.com/osmc/osmc/blob/master...Kodi.patch because with v17, if you use a sigterm handler it seems settings can disappear on a reboot.

Uptime doesn't get stored (doesn't matter); but everything else will persist even with unexpected powerdowns.
Reply

Logout Mark Read Team Forum Stats Members Help
When are skin settings being saved?0