Kodi Community Forum
Release script.skinshortcuts - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
+---- Thread: Release script.skinshortcuts (/showthread.php?tid=178294)



RE: script.skinshortcuts - badaas - 2017-02-11

Ok, so I can get a custom button and property in edit menu,

Code:
    <propertySettings property="itemVisible" title="Select Condition" />
    <property property="itemVisible">!Window.IsVisible(home)</property>

how do I
1) Change from a select property to 'allow user to type input'
2) Use this to stop item menu being made in includes (just a visible will cause a blank in list)
3) OR is there already a property available in script for this?

Ok,so at this now:

Code:
                    <onclick>Skin.SetString(itemVisible)</onclick>

                    <onclick>SetProperty(customProperty,itemVisible)</onclick>
                    <onclick>SetProperty(customValue,$INFO[Skin.String(itemVisible)])</onclick>
                    <onclick>SendClick(404)</onclick>

Ok, so now I need to find if I can insert into the mainmenu <item> code my own code via template/override? I THINK I can for submenus but not mainHuh

So it isn't possible to inject item code for mainmenu without modding the .py?

Well, I modded the datafunctions.py as I just can't see it, if I had time I would add a check for the custom property name 'itemVisible' to the mainmenu checkVisibilty and write content as a visible, but no time Sad

I added
Code:
# General visibilities
        elif action == "activatewindow(home)":
            return "!Window.IsVisible(home)"
        elif action == "back" or action == "action(back)" or action == "previousmenu":
            return "!Window.IsVisible(home)"



RE: script.skinshortcuts - ketterer - 2017-02-12

Could I ask for assistance or a few pointers on how to add skinshortcuts support into estuary v2. I have read the getting started and much of it makes sense, but also a lot doesn't. I am still trying to better fimilarize my self with the code of estuary, but currently do not really have a handle on it


RE: script.skinshortcuts - braz - 2017-02-12

(2017-02-11, 11:54)badaas Wrote:
(2017-02-10, 22:41)braz Wrote: Does anyone know how to override the icon for an item whose label is defined in skinshortcuts' language file? For example, I'm trying to override the icon for "Default widgets" as shown in the screenshot below.

I've tried putting the following code in my overrides.xml, but that didn't work. Any ideas?

Code:
<icon labelID="$ADDON[script.skinshortcuts 32119]">special://skin/extras/icons/widget.png</icon>

Thanks!

in shortcuts/overrides.xml
Code:
<icon labelID="32119">special://skin/extras/icons/wand.png</icon>
Thanks @badaas, that worked for 32119 and I don't know why I never tried that! Have you been able to override the icon for the "Custom item" button? The label ID is 32024 as far as I can tell, but I haven't been able to override it using the same method.


RE: script.skinshortcuts - badaas - 2017-02-12

(2017-02-12, 09:26)braz Wrote:
(2017-02-11, 11:54)badaas Wrote:
(2017-02-10, 22:41)braz Wrote: Does anyone know how to override the icon for an item whose label is defined in skinshortcuts' language file? For example, I'm trying to override the icon for "Default widgets" as shown in the screenshot below.

I've tried putting the following code in my overrides.xml, but that didn't work. Any ideas?

Code:
<icon labelID="$ADDON[script.skinshortcuts 32119]">special://skin/extras/icons/widget.png</icon>

Thanks!

in shortcuts/overrides.xml
Code:
<icon labelID="32119">special://skin/extras/icons/wand.png</icon>
Thanks @badaas, that worked for 32119 and I don't know why I never tried that! Have you been able to override the icon for the "Custom item" button? The label ID is 32024 as far as I can tell, but I haven't been able to override it using the same method.

Smile
The DefaultShortCut.png is hardcoded, it uses the media/DefaultShortCut.png, you'd have to edit the .py

Or catch it in dialogselect.xml container 6

Code:
                        <control type="image">
                            <visible>!String.Contains(Listitem.Icon, DefaultShortCut)</visible>
                            <left>10</left>
                            <top>10</top>
                            <width>100</width>
                            <height>100</height>
                            <aspectratio aligny="center" align="center">keep</aspectratio>
                            <texture fallback="DefaultFolder.png">$INFO[ListItem.Icon]</texture>
                        </control>
                        <control type="image">
                            <visible>String.Contains(Listitem.Icon, DefaultShortCut)</visible>
                            <left>10</left>
                            <top>10</top>
                            <width>100</width>
                            <height>100</height>
                            <aspectratio aligny="center" align="center">keep</aspectratio>
                            <texture fallback="DefaultFolder.png">[b]$INFO[MyDefaultShortCut][/b]</texture>
                        </control>



RE: script.skinshortcuts - braz - 2017-02-12

(2017-02-12, 14:41)badaas Wrote: The DefaultShortCut.png is hardcoded, it uses the media/DefaultShortCut.png, you'd have to edit the .py
Thank badaas, it's too bad the skinshortcuts "Custom item" icon can't be overridden.


RE: script.skinshortcuts - badaas - 2017-02-12

(2017-02-12, 19:40)braz Wrote:
(2017-02-12, 14:41)badaas Wrote: The DefaultShortCut.png is hardcoded, it uses the media/DefaultShortCut.png, you'd have to edit the .py
Thank badaas, it's too bad the skinshortcuts "Custom item" icon can't be overridden.

Yh, you can delete all Default* pngs apart from DefaultFolder.png, it will then use that [this is how kodi defaults if all pngs missing], but then users still cant edit that.

http://kodi.wiki/view/Default_Icons#Other


RE: script.skinshortcuts - ketterer - 2017-02-13

alright, So, I have gotten past the point where I add the build lines, included them in includes.xml, but I can't find a way to display the menus. I have also been able to implement a management dialog that I borrowed from another skin for the time being.

I have commented the content section of the home.xml and then added the code from the getting started guide. now the background and the side panel, the word kodi and power, settings, search and the time show up. and looks like this
Image

I can upload what i have as a zip, its all pretty rough so it might not be easy to understand what I have done


RE: script.skinshortcuts - ketterer - 2017-02-13

alright, So, I have gotten past the point where I add the build lines, included them in includes.xml, but I can't find a way to display the menus. I have also been able to implement a management dialog that I borrowed from another skin for the time being.

I have commented the content section of the home.xml and then added the code from the getting started guide. now the background and the side panel, the word kodi and power, settings, search and the time show up. and looks like this
Image

I can upload what i have as a zip, its all pretty rough so it might not be easy to understand what I have done


RE: script.skinshortcuts - ketterer - 2017-02-14

Past another herdle, I now have the home menu up and running, all be it with zero widgets, but basic integration acheived.
Now any tips for getting widgets please let me know


RE: script.skinshortcuts - ketterer - 2017-02-14

OK, is there a way to disable building submenues? Also is there a way to stop or disable the automatic visible feature when building mainmenu?


RE: script.skinshortcuts - ketterer - 2017-02-15

Hello,
I want to build a menu with the default behavior in estuary, where the visibility is attached to a skin settings button, so in mainmenu.DATA.xml I have:
Code:
<shortcut>
        <label>342</label>
        <label2>$INFO[Window(home).Property(Movies.watched)]$INFO[Window(home).Property(Movies.Count), / ]</label2>
        <action condition="Library.HasContent(movies)">ActivateWindow(Videos,videodb://movies/titles/,return)</action>
        <action condition="!Library.HasContent(movies)">ActivateWindow(Videos,sources://video/,return)</action>
    <defaultID>movies</defaultID>
        <icon>icons/sidemenu/movies.png</icon>
    <thumb>icons/sidemenu/movies.png</thumb>
    <visible>!Skin.HasSetting(HomeMenuNoMovieButton)</visible>

    </shortcut>
    <shortcut>
        <label>20343</label>
        <label2>$INFO[Window(home).Property(Episodes.watched)]$INFO[Window(home).Property(Episodes.Count), / ]</label2>
        <defaultID>tvshows</defaultID>
        <thumb>icons/sidemenu/tv.png</thumb>
    <icon>icons/sidemenu/tv.png</icon>
        <action condition="Library.HasContent(tvshows)">ActivateWindow(Videos,videodb://tvshows/titles/,return)</action>
        <action condition="!Library.HasContent(tvshows)">ActivateWindow(Videos,sources://video/,return)</action>
        <visible>!Skin.HasSetting(HomeMenuNoTVShowButton)</visible>
    </shortcut>


but then when its build I get this:
Code:
<item id="1">
            <property name="id">$NUMBER[1]</property>
            <label>$LOCALIZE[342]</label>
            <label2>$INFO[Window(home).Property(Movies.watched)]$INFO[Window(home).Property(Movies.Count), / ]</label2>
            <icon>icons/sidemenu/movies.png</icon>
            <thumb>icons/sidemenu/movies.png</thumb>
            <property name="labelID">movies</property>
            <property name="defaultID">movies</property>
            <visible>[Library.HasContent(Movies)] + [!Skin.HasSetting(HomeMenuNoMovieButton)]</visible>
            <onclick condition="Library.HasContent(movies)">ActivateWindow(Videos,videodb://movies/titles/,return)</onclick>
            <property name="path">ActivateWindow(Videos,videodb://movies/titles/,return)</property>
            <property name="list">videodb://movies/titles/</property>
            <onclick condition="!Library.HasContent(movies)">ActivateWindow(Videos,sources://video/,return)</onclick>
            <visible>StringCompare(System.ProfileName,Master user)</visible>
            <property name="submenuVisibility">movies</property>
            <property name="group">mainmenu</property>
            <property name="hasSubmenu">True</property>
        </item>
<item id="2">
            <property name="id">$NUMBER[2]</property>
            <label>$LOCALIZE[20343]</label>
            <label2>$INFO[Window(home).Property(Episodes.watched)]$INFO[Window(home).Property(Episodes.Count), / ]</label2>
            <icon>icons/sidemenu/tv.png</icon>
            <thumb>icons/sidemenu/tv.png</thumb>
            <property name="labelID">tvshows</property>
            <property name="defaultID">tvshows</property>
            <visible>[Library.HasContent(TVShows)] + [!Skin.HasSetting(HomeMenuNoTVShowButton)]</visible>
            <onclick condition="Library.HasContent(tvshows)">ActivateWindow(Videos,videodb://tvshows/titles/,return)</onclick>
            <property name="path">ActivateWindow(Videos,videodb://tvshows/titles/,return)</property>
            <property name="list">videodb://tvshows/titles/</property>
            <onclick condition="!Library.HasContent(tvshows)">ActivateWindow(Videos,sources://video/,return)</onclick>
            <visible>StringCompare(System.ProfileName,Master user)</visible>
            <property name="submenuVisibility">tvshows</property>
            <property name="group">mainmenu</property>
            <property name="hasSubmenu">True</property>
        </item>

for the most part everything is good, except
Code:
<visible>[Library.HasContent(TVShows)] + [!Skin.HasSetting(HomeMenuNoTVShowButton)]</visible>

I only want the second part to be present, but by default skinshortcuts automatically adds its own visability condition, but I do not require nor want that. is there a way to disable this?


RE: script.skinshortcuts - Guilouz - 2017-02-16

Wrong post sorry.


RE: script.skinshortcuts - BobCratchett - 2017-02-16

(2017-02-15, 04:31)ketterer Wrote: <snip/>
I only want the second part to be present, but by default skinshortcuts automatically adds its own visability condition, but I do not require nor want that. is there a way to disable this?

The automatic visibility conditions are a core part of the script - there's no way to remove them. The closest is Skin Shortcuts Docs: Run a different command based on automatic visibility condition. I've looked over your recent posts, and it reads as if you're spending a lot of time fighting how the Skin Shortcuts script works - it's worth remembering that the Skin Shortcuts script does impose a certain way of dealing with menu's or other lists of user shortcuts and, if it's not how you want your skin to work, it may be that this isn't the best script for your use case.


RE: script.skinshortcuts - ketterer - 2017-02-16

Thank you for the info.
I'm acutely pretty happy with the way it works, I think I just need to learn more of about spinning in general. The reason I wanted to do these things out to emulate the estuary skin, I do not need submenues and rather then making list items visible it not I was hoping to use the widgets to manage that. I think I have seen how this whisky works tho now. . I was just wondering if there is a way to make a particular shortcut airways visible. I think you have provided the proper info. I will review it and try to use it


RE: script.skinshortcuts - BobCratchett - 2017-02-16

Just a general note. I haven't been able to be active recently, and can see there have been a few issues and questions raised during my downtime. Rather than go through and try to respond to each regardless of whether a solution was subsequently found or the question is no longer relevant, please feel free to re-post any issues and questions that are still relevant and I'll do my best to assist where I can.

(As my time is still limited, I'm going to enforce a strict rule of any issues/bugs will require a full debug log before I'll look into them Wink)