2014-02-13, 19:09
Can anyone help with some testing of an update to this script?
Long story short, I've never been able to get performance when using Gothams new method of filling a list to be great on lower-powered devices such as the rPi, so I went back to basics, and added the ability for the script to generate an xml file containing the menus, which can then be included in the skin.
The advantage of this method is that, once the file has been generated, the menu acts exactly as any traditional skin-provided menu, because that is now what it is. And it only has to be generated on skin first run, and after the user updates a menu.
The disadvantages? Well, skins can only load files from their own directory, so the script has to write a file to the skin directory. And skins can only pick up on changes to files when they're reloaded, so it has to reload the skin after building the includes file.
Once the file is generated though, performance is absolutely equal to any traditional menu.
If you'd like to test you'll need the development branch of skin shortcuts - https://github.com/unfledged/script.skin...evelopment
And here's a copy of Confluence (based on uNiversaI's updates) with the new method built in to provide the main menu, the sub-menu and the favourites below the menu - https://github.com/unfledged/skin.confluence
If I can tempt you to test further, it should be pretty easy to add to a skin...
1. In the includes.xml file add the line
2. In Home.xml - in an <onload> tag, and in SkinSettings.xml - in an <onunload> tag:
Where mainmenuID is the id of the list containing your main menu and levels is the number of additional submenus (so for the Confluence skin above, which has an additional submenu for the favourites below the menu, it would be 1)
And when just providing submenus, add...
... a comma-separated list of the groupnames.
3. And in the lists where the items are to appear
Where the include can be
skinshortcuts-mainmenu
skinshortcuts-submenu
skinshortcuts-[groupname]
With the latter two appendable by -[level number] for additional menus.
Thanks for all your help.
Long story short, I've never been able to get performance when using Gothams new method of filling a list to be great on lower-powered devices such as the rPi, so I went back to basics, and added the ability for the script to generate an xml file containing the menus, which can then be included in the skin.
The advantage of this method is that, once the file has been generated, the menu acts exactly as any traditional skin-provided menu, because that is now what it is. And it only has to be generated on skin first run, and after the user updates a menu.
The disadvantages? Well, skins can only load files from their own directory, so the script has to write a file to the skin directory. And skins can only pick up on changes to files when they're reloaded, so it has to reload the skin after building the includes file.
Once the file is generated though, performance is absolutely equal to any traditional menu.
If you'd like to test you'll need the development branch of skin shortcuts - https://github.com/unfledged/script.skin...evelopment
And here's a copy of Confluence (based on uNiversaI's updates) with the new method built in to provide the main menu, the sub-menu and the favourites below the menu - https://github.com/unfledged/skin.confluence
If I can tempt you to test further, it should be pretty easy to add to a skin...
1. In the includes.xml file add the line
Code:
<include file="script-skinshortcuts-includes.xml"/>
2. In Home.xml - in an <onload> tag, and in SkinSettings.xml - in an <onunload> tag:
Code:
RunScript(script.skinshortcuts,type=buildxml&mainmenuID=9000&levels=0)
Where mainmenuID is the id of the list containing your main menu and levels is the number of additional submenus (so for the Confluence skin above, which has an additional submenu for the favourites below the menu, it would be 1)
And when just providing submenus, add...
Code:
&group=[group1],[group2],[group3]...
... a comma-separated list of the groupnames.
3. And in the lists where the items are to appear
Code:
<content>
<include>skinshortcuts-mainmenu</include>
</content
Where the include can be
skinshortcuts-mainmenu
skinshortcuts-submenu
skinshortcuts-[groupname]
With the latter two appendable by -[level number] for additional menus.
Thanks for all your help.