• 1
  • 15
  • 16
  • 17(current)
  • 18
  • 19
  • 140
Release script.skinshortcuts
Hey Unfledged,

Could it be that the current GitHub version is buggy?

My additional custom widget menus won't work anymore.
PHP Code:
<include>
        <
item id="1">
            <
label>$LOCALIZE[33060]</label>
            <
label2>Power</label2>
            <
icon>backgrounds/bg/power.jpg</icon>
            <
thumb />
            <
property name="labelID">33060</property>
            <
property name="defaultID">33060</property>
            <
onclick>ActivateWindow(10111)</onclick>
            <
visible>StringCompare(System.ProfileName,Master user) + [StringCompare(Window(10000).Property(submenuVisibility),widgets1)]</visible>
            <
property name="isSubmenu">True</property>
            <
property name="group">widgets1</property>
        </
item>
        <
item id="2">
            <
label>$LOCALIZE[20387]</label>
            <
label2>Videos</label2>
            <
icon>DefaultRecentlyAddedEpisodes.png</icon>
            <
thumb />
            <
property name="labelID">20387</property>
            <
property name="defaultID">20387</property>
            <
onclick>ActivateWindow(Videos,RecentlyAddedEpisodes,return)</onclick>
            <
visible>StringCompare(System.ProfileName,Master user) + [StringCompare(Window(10000).Property(submenuVisibility),widgets1)]</visible>
            <
property name="isSubmenu">True</property>
            <
property name="group">widgets1</property>
        </
item>
    </include> 

It seems that the include name is missing -> <include name="skinshortcuts-group-widgets1">
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
It's very likely to be buggy at the moment. I'll do my best to fix that this evening (and, as always, thanks for the bug report.) Any fixes after that will be next weekend. Smile

Edit: should now be fixed.
Reply
Thanks. The only issue that I noticed Smile
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
(2014-07-10, 19:36)Unfledged Wrote: "Default" within the background selection dialog could be better named - it is designed to be used to select your skins default background - no custom background.

The <defaultbackground /> is used to say which <background /> should be associated with a menu item by default - e.g. The first time the menu is esited/built for the skin (after that, it's whatever the user has selexted of course.)

So if you had

Code:
<background label="Movie default">movieBackground</background>

that you want to set as the default for a main menu item with the labelID "movies"...

Code:
<backgrounddefault labelID="movies" group="mainmenu">movieBackground</background>

(I have half-a-feeling the group property isn't needed if it's a main menu item - check the docs, I'll have wriiten in there if it's not) I'm very happy to consider switching the Default option to return to the <backgrounddefault /> option, with the addition of a None option. Though maybe better to highlight which background is the default in the list. I'll think about it!

I'll look into the widget labels ASAP, but do try without the ::LOCAL:: it isn't entirely consistent yet when that will and won't work Blush
I still don't get this I'm afraid. Confused

All I'm trying to do is have a set of default backgrounds when the skin is first used or if the user selects 'Reset shortcuts' but I can't get it working.

Here's my overrides.xml

PHP Code:
<overrides>

    <
background label="Vidoes">home\videos\</background>
    <
background label="Music">home\music\</background>
    <
background label="DVD">home\dvd\</background>
    <
background label="Movies">home\movies\</background>
    <
background label="TVShows">home\tvshows\</background>
    <
background label="Pictures">home\pictures\</background>
    <
background label="Weather">home\weather\</background>
    <
background label="Settings">home\settings\</background>
    <
background label="Shutdown">home\shutdown\</background>
    <
background label="Favourites">home\favourites\</background>
    <
background label="Addons">home\addons\</background>
    <
backgrounddefault label="Vidoes" group="mainmenu">home\videos\</backgrounddefault>
    <
backgrounddefault label="Music" group="mainmenu">home\music\</backgrounddefault>
    <
backgrounddefault label="DVD" group="mainmenu">home\dvd\</backgrounddefault>
    <
backgrounddefault label="Movies" group="mainmenu">home\movies\</backgrounddefault>
    <
backgrounddefault label="TVShows" group="mainmenu">home\tvshows\</backgrounddefault>
    <
backgrounddefault label="Pictures" group="mainmenu">home\pictures\</backgrounddefault>
    <
backgrounddefault label="Weather" group="mainmenu">home\weather\</backgrounddefault>
    <
backgrounddefault label="Settings" group="mainmenu">home\settings\</backgrounddefault>
    <
backgrounddefault label="Shutdown" group="mainmenu">home\shutdown\</backgrounddefault>
    <
backgrounddefault label="Favourites" group="mainmenu">home\favourites\</backgrounddefault>
    <
backgrounddefault label="Addons" group="mainmenu">home\addons\</backgrounddefault>
    <
backgroundBrowse>True</backgroundBrowse>

</
overrides

Even selecting to change the fanart and clicking 'default' results in no backgrounds getting set.

Thanks as always.
Reply
(2014-08-04, 15:23)Hitcher Wrote: I still don't get this I'm afraid. Confused

All I'm trying to do is have a set of default backgrounds when the skin is first used or if the user selects 'Reset shortcuts' but I can't get it working.

Here's my overrides.xml

PHP Code:
<overrides>

    <
background label="Vidoes">home\videos\</background>
    <
background label="Music">home\music\</background>
    <
background label="DVD">home\dvd\</background>
    <
background label="Movies">home\movies\</background>
    <
background label="TVShows">home\tvshows\</background>
    <
background label="Pictures">home\pictures\</background>
    <
background label="Weather">home\weather\</background>
    <
background label="Settings">home\settings\</background>
    <
background label="Shutdown">home\shutdown\</background>
    <
background label="Favourites">home\favourites\</background>
    <
background label="Addons">home\addons\</background>
    <
backgrounddefault label="Vidoes" group="mainmenu">home\videos\</backgrounddefault>
    <
backgrounddefault label="Music" group="mainmenu">home\music\</backgrounddefault>
    <
backgrounddefault label="DVD" group="mainmenu">home\dvd\</backgrounddefault>
    <
backgrounddefault label="Movies" group="mainmenu">home\movies\</backgrounddefault>
    <
backgrounddefault label="TVShows" group="mainmenu">home\tvshows\</backgrounddefault>
    <
backgrounddefault label="Pictures" group="mainmenu">home\pictures\</backgrounddefault>
    <
backgrounddefault label="Weather" group="mainmenu">home\weather\</backgrounddefault>
    <
backgrounddefault label="Settings" group="mainmenu">home\settings\</backgrounddefault>
    <
backgrounddefault label="Shutdown" group="mainmenu">home\shutdown\</backgrounddefault>
    <
backgrounddefault label="Favourites" group="mainmenu">home\favourites\</backgrounddefault>
    <
backgrounddefault label="Addons" group="mainmenu">home\addons\</backgrounddefault>
    <
backgroundBrowse>True</backgroundBrowse>

</
overrides

Even selecting to change the fanart and clicking 'default' results in no backgrounds getting set.

Thanks as always.

Backgrounds/Widgets probably needs a few improvements (suggestions always welcome!), but at the moment it works in three parts...

Part one - define the available backgrounds that will be available when clicking 310. Looks like you've got this covered Smile but just to be clear

Code:
<background label="[Label]">[backgroundID]</background>

[Label] - The display name of the background (can be a localised string)
[backgroundID] - A string you use to identify the background

Part two - define the defaults for your menu items. You're using label as the tag here, but it's defined against the (and the tag should be) labelID:

Code:
<backgrounddefault labelID="[LabelID]" group="[GroupName]">[backgroundID]</backgrounddefault>

[backgroundID] - A string you use to identify the background
[GroupName] - [Optional] The group that the labelID must be in, for example "movies". If omitted, the default will apply to items in the main menu.
[labelID] - The labelID you are providing a default for.

So, to define a background for movies, and assign it as the default for the mainmenu item with labelID movies:

Code:
<background label="Movies">home\movies\</background>
<backgrounddefault labelID="movies">home\movies\</backgrounddefault>

Note the tag "labelID" instead of "label", the labelID of "movies" instead of "Movies" (labelID's are always lowercase).

Part three - display a background based on the selected background. If using a variable, something like the following:

Code:
<variable name="background">
    <value condition="StringCompare(Container(9000).ListItem.Property(background),home\movies\)">path/to/movies/background.png</value>
    <value>path/to/default/background.png</value>
</variable>

(Because you're using backgroundBrowse to allow the user to browse for a background image, you probably want the penultimate value to check for a non-empty background property, where the value is used as the background image)

"Default" in the background selector was badly named and actually got renamed yesterday to "None" on git - it removes the background property with the expectation that the skins global default background will be used. (Also added an indicator (*) next to the default background for that item.)

That's probably all still clear as mud, so if I can expand on any aspect, please say Smile
Reply
Typical that it was a typo causing the problem, all working now thanks.

Also, the data files are much nicer to work with thanks.
Reply
(2014-08-04, 18:28)Hitcher Wrote: Typical that it was a typo causing the problem, all working now thanks.

Typo's are the worst, aren't they Wink

(2014-08-04, 18:28)Hitcher Wrote: Also, the data files are much nicer to work with thanks.

That's the sort of thing its always great to know Smile
Reply
I apologise in advance if this is something I've done but I using the latest build I can no longer change the widgets.

Thanks.
Reply
You remember when I said typo's are the worst? Guess what I made Blush. Now fixed on git, thanks Smile
Reply
Wink

EDIT: All working, thanks.
Reply
Just updating my skins to use the new DATA files and I was wondering whether it's a possible for you to add the ability for us to use visible conditions?

ie

PHP Code:
<shortcuts>
    <
shortcut>
        <
label>TWiT</label>
        <
label2>Music Add-On</label2>
        <
defaultID>plugin.video.twit</defaultID>
        <
icon>special://home/addons/plugin.video.twit/icon.png</icon>
        
<thumb />
        <
action>ActivateWindow(10501,"plugin://plugin.video.twit",return)</action>
        <
visible>System.HasAddon(plugin.video.twit)</visible>
    </
shortcut>
</
shortcuts

Thanks.
Reply
Makes sense, so added to git.

(Haven't checked the behaviour in all situations, but in the only one I can think which would cause issues - the action being overriden - the visibility condition is ignored.)

Btw, if that's an extract from default shortcuts you're providing, the defaultID tag will be ignored by the script and generated fresh (though in this case it should generate to the same defaulID - I set it up this way to try and ensure the defaultID would always be the same across skins.
Reply
Everything's generated except for the image path and the visible condition.

Thanks again.
Reply
Is this something I'm doing wrong?

Code:
Error Type: <type 'exceptions.SyntaxError'>
Error Contents: ('unexpected EOF while parsing', ('<string>', 0, 0, ''))
Traceback (most recent call last):
  File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\gui.py", line 1380, in onAction
    self._save_shortcuts()
  File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\gui.py", line 484, in _save_shortcuts
    datafunctions.UpgradeFunctions().upgrade_all_single_file( target.replace (".DATA.xml", ".shortcuts" ) )
  File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\datafunctions.py", line 771, in upgrade_all_single_file
    self.upgrade_file( path )
  File "C:\Users\Kevin\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\datafunctions.py", line 812, in upgrade_file
    shortcuts = eval( list )
SyntaxError: ('unexpected EOF while parsing', ('<string>', 0, 0, ''))
-->End of Python script error report<--
Reply
I pushed a commit to the wrong branch. It has been reverted. Thanks for the heads up Smile
Reply
  • 1
  • 15
  • 16
  • 17(current)
  • 18
  • 19
  • 140

Logout Mark Read Team Forum Stats Members Help
script.skinshortcuts8