(2018-06-25, 12:59)attackkkkkk Wrote: My problem is that because it runs 24/7, the widgets don’t refresh automatically (for example Twitch widget).. sometimes it shows that ( for example: summit1g is streaming) and when I click to open he is not streaming because the widget was not refreshed..
How can I set a widget to refresh every x hours?
You can't. The skin doesn't control when widgets refresh - Kodi decides when to update container content. You can force a reload of all widgets by reloading the skin with ReloadSkin(). Reload skin is available by default from the shutdown menu (press S on keyboard).
There is a trick you can do with skin helper to get widgets to refresh every 10 minutes.
1. Open the widget customisation dialog in Skin Settings.
2. Locate the widget you want to refresh and click the spanner icon
3. Scroll down the options to "Custom Item > " at the very bottom
4. Click "Custom Item >" and it will show you the path of the widget
5. Look carefully at the path. If it contains a question mark "?" in it then add the following to the end of the path:
Code:
&reload=$INFO[Window(Home).Property(widgetreload2)]
6. If the path does not contain a question mark, then change the & to ?
Code:
?reload=$INFO[Window(Home).Property(widgetreload2)]
IMPORTANT NOTE: There is a bug where when clicking "Custom Item >" it will show the path for the first widget item in the edit box. There is nothing I can do about this, as it is an issue with skinshortcuts. HOWEVER, there is a work around:
1. Set your desired widget to the first widget slot.
2. Click custom item and carefully copy down the path.
3. Then click the spanner on the desired widget slot and choose "Custom Item >"
4. Enter the path that you copied down into the custom item box.
Skinshortcuts will save the correct path, it just has limitation where it is not possible to specify which widget to use to autofill the keyboard dialog and so instead it pulls the first widget item.