Custom Skins being overwritten when OSMC updates

I’m running the Vero 4 and just updated and again the skins I use for BOM weather, Estuary are being overwritten with the default MyWeather.xml and DialogSeekBar.xml

Is there any way to prevent these files being overwritten when OSMC updates?

You can hold back OSMC updates.
If the improvements you have made are beneficial you could upstream them.

If they’re just personal changes, you could copy the Estuary skin entirely and rename the skin name to create your own skin.

The skin changes are provided by the Dev of the BOM weather Kodi addon.

If they’re beneficial, ask him to get them added by default.

If they’re not, ask him to provide a separate Estuary skin with these changes. Failing that, we can advise you on how to make these changes persistent

Sam

If you’re making changes to the default Estuary skin, they will always be overwritten by updates. The way to avoid that is to make a mod of Estuary and put it in your userdata/addons folder. Basically you need to:

  1. copy /usr/share/kodi/addons/skin.estuary to /usr/share/kodi/addons/skin.estuary-mod
  2. go into the mod directory and edit addon.xml, changing the add-on ID (to match the folder name) and name (to something you’ll recognize as the mod).
  3. restart Kodi
  4. go into the add-ons section in Kodi and enable the mod and then switch to it

Now you can edit the files in your mod and they’ll never be touched by any updates. But if Estuary is ever updated it’s on you to figure out how to merge those updates into your mod.

Didn’t you mean .kodi/addons?

And this is exactly what concerns me.

it’s /usr/share/kodi/addons/ here - not in .kodi - it’s a Vero 4 stock standard

Sure that is where the original version is, I was more referring to where I would install a custom version.

Either will do. As long as it’s not named skin.estuary it will be fine in /usr/share. But if in .kodi will be backed up when you use the backup in MyOSMC :slight_smile:

I actually meant ~/.kodi/addons for the destination, but in copying and pasting stuff around I did it wrong. When dealing with modding Estuary (or the OSMC skin), you have two choices. Fork the skin and keep it updated (that’s what I do) or make copies of the files you modified and replace them every time an update comes out. Either way you’re going to have to keep track of changes.

Having said that, Estuary at least tends to be pretty stable within a major release (as did Confluence before that). So I think it’s less work to fork the skin than replace files every time.

Is it possible to make a cron job to overwrite the 2 files on a schedule? It seems if I have the new files in the skin folder (with a different name obviously) that they are not lost when the skin is updated so what would a cro job look like to re-copy those to the correct names every 24 hours say?

Sure, you can do that. It feels like you’re going to do lots of work to avoid some work, but you can definitely do that. You will still need to check the Estuary change log after update though. If the files you’ve modded are updated and you overwrite them you will lose what ever updates or bug fixes the Kodi devs provided in those specific files, and the old files you have might not work with the rest of the new skin. I had that happen once, and that’s when I finally decided it was easier to maintain a mod than always overwriting files.

Writing a cron job once is lots of work??
If I do get it not working I can just recert to the new files and contact the skin dev for the updated ones.
Done once rather than having to check all the time seems easier to me.

so I installed rsync and if I execute this command:

sudo rsync -a /home/osmc/.kodi/addons/BOM-Krypton/ /usr/share/kodi/addons/skin.estuary/xml

It copies the files.

How do I make that a cron job?

Hi,

It would probably easier to put it in a bash script and have cron run that.

Thanks Tom.

OK but I’m flying blind here - how do I do that?

So far I installed cron and rsync and running crontab -e I entered this:

0 0 * * * sudo /usr/bin/rsync -a /home/osmc/.kodi/addons/BOM-Krypton/ /usr/share/kodi/addons/skin.estuary/xml

Will that work to run every night at midnight?

also I’m wondering - it seemed to create a new crontab for the osmc user… sudo in there should run it as ‘root’ right?

is there a way I can check the cron job to see if it will work? If I do sudo cron it gives me an error:
cron: can’t lock /var/run/crond.pid, otherpid may be 11755: Resource temporarily unavailable

see I know almost enough to be dangerous!

Hi,

You would be better using roots crontab, I don’t cron recognises sudo

sudo crontab -e

Just drop the sudo from the cron line, and it should work; but as I say it would probably be better with a script

creating a script the osmc home directory fro example skin.sh

#!/bin/bash
/usr/bin/rsync -a /home/osmc/.kodi/addons/BOM-Krypton/ /usr/share/kodi/addons/skin.estuary/xml

chmod +x /home/osmc/skin.sh and add this line to roots cron

0 0 * * * /home/osmc/skin.sh

Thanks Tom.

thanks Tom. I’ll try that!