•   
  • 1
  • 130
  • 131
  • 132
  • 133
  • 134(current)
Release script.skinshortcuts
(2020-05-16, 01:03)pkscout Wrote: OK, I've spent the last couple of hours going through the documenation, looking though the code, and looking at the XML files the script generates to try and figure out how I might add a custom widget to a skin (I"m using Arctic Zephyr 2, so I'm basically trying to mod the skin to add this widget as an option).  I specifically would like to have the PVR status widget

this may be script.skin.helper.service pvr timers
Reply
(2020-05-16, 01:03)pkscout Wrote: OK, I've spent the last couple of hours going through the documenation, looking though the code, and looking at the XML files the script generates to try and figure out how I might add a custom widget to a skin (I"m using Arctic Zephyr 2, so I'm basically trying to mod the skin to add this widget as an option).  I specifically would like to have the PVR status widget Estuary has that tells me what the next recording is and what is currently recording.  I have the XML from Estuary to do it (probably needs some changes to adapt visually to AZ2), I just can't figure out how or where to add it so that it shows up in the widgets I can pick it as an option to show on the LiveTV section of the home screen.  It feels like it should go into the templates.xml file, but ¯\_(ツ)_/¯.  Here's some of the code I'm trying to use as a widget (it does the currently recording part).


        <control type="image">
            <top>80</top>
            <left>16</left>
            <width>670</width>
            <height>225</height>
            <texture border="21">dialogs/dialog-bg.png</texture>
        </control>
        <control type="image">
            <left>55</left>
            <top>122</top>
            <width>140</width>
            <height>140</height>
            <aspectratio>keep</aspectratio>
            <texture background="true" fallback="DefaultVideo.png">$INFO[PVR.TVNowRecordingChannelIcon]</texture>
        </control>
        <control type="label">
            <left>225</left>
            <top>127</top>
            <height>25</height>
            <width>420</width>
            <label>$LOCALIZE[19158]</label>
            <aligny>center</aligny>
            <font>font36_title</font>
            <shadowcolor>black</shadowcolor>
        </control>
        <control type="label">
            <left>225</left>
            <top>172</top>
            <height>105</height>
            <width>420</width>
            <label>$INFO[PVR.TVNowRecordingDateTime][CR]$INFO[PVR.TVNowRecordingTitle][CR]$INFO[PVR.TVNowRecordingChannel]</label>
            <font>font12</font>
            <shadowcolor>black</shadowcolor>
        </control>

BTW, it looks like AZ2 uses skin shortcuts to generate everything, so I can't just manually shove this somewhere without it getting overwritten.

Thanks.

@pkscout, for a widget to show up as an option that you can choose when you customize the menu, it needs to be in the <widget groupings> section of the overrides.xml file in the shortcuts folder of the skin. You don’t necessarily need to have the code (actual controls) in the template.xml file, but I guess it is a good idea.

I don’t know the code of AZ2, so I can’t just provide you a snippet you can use. What I do in Amber for that widget in particular is that I have a toggle (radio button) in the menu customization dialog (script-skinshortcuts.xml) that sets whether a menu item will have the PVR widget or not. Then, in the skin’s menu presentation code (look in includes_horizontal_home.xml and includes_vertical_home.xml) I include the pvr widget group which will be visible if the toggle (which skinshortcuts sets as a property of the menu item) is on. The code for the PVR widget is in the file includes_shelf_contents.xml, around line 639. Again, this is what I do in Amber (https://github.com/bartolomesoriano/skin.amber). You are more than welcome to look at the code and use whatever could be of help to you for AZ2.

Regards,

Bart
Reply
(2020-05-16, 08:37)bsoriano Wrote: @pkscout, for a widget to show up as an option that you can choose when you customize the menu, it needs to be in the <widget groupings> section of the overrides.xml file in the shortcuts folder of the skin. You don’t necessarily need to have the code (actual controls) in the template.xml file, but I guess it is a good idea.

I don’t know the code of AZ2, so I can’t just provide you a snippet you can use. What I do in Amber for that widget in particular is that I have a toggle (radio button) in the menu customization dialog (script-skinshortcuts.xml) that sets whether a menu item will have the PVR widget or not. Then, in the skin’s menu presentation code (look in includes_horizontal_home.xml and includes_vertical_home.xml) I include the pvr widget group which will be visible if the toggle (which skinshortcuts sets as a property of the menu item) is on. The code for the PVR widget is in the file includes_shelf_contents.xml, around line 639. Again, this is what I do in Amber (https://github.com/bartolomesoriano/skin.amber). You are more than welcome to look at the code and use whatever could be of help to you for AZ2.

Regards,

Bart 
Thanks for the tips.  I started down the path you mentioned, but for the life of me I could not figure out the visible condition so that the PVR widget showed up only on the screen you had indicated in the settings.  AZ2 has a couple "fullscreen" widgets that only work if they are the first ones in the widget list (AZ2 ignores any widget after that), so I added a TV PVR Recording Widget in the PVR area in overrides.xml with a title that indicated it had to be in the first position.  Instead of ignoring any widgets after that, I just did a conditional animation to push the other widgets down the screen if the TV PVR Recording Widget was present.  It works, although I have a feeling I missed a more elegant solution.  But after two hours of trying to figure out where various settings are stored with Skin Shortcuts, I'm OK with that.  '-)
Reply
@mikeSiLVO, any input on this? https://github.com/mikesilvo164/script.s.../issues/19
Reply
Maybe someone could help me with this:

I've got a list of widgets users can select from in my overrides.xml within <widget-groupings> part of that file. Under each defined node there're a few widgets defined via shortcuts like this:


<!-- Widget Grouping -->
<widget-groupings>
    <!-- Video -->
    <node label="3">
        <node label="$LOCALIZE[31178]" condition="Library.HasContent(movies) | Library.HasContent(tvshows)">
            <!-- Movies -->
            <node label="$LOCALIZE[342]" condition="Library.HasContent(movies)">
                <shortcut widget="NewMovies" label="$LOCALIZE[31179]" icon="DefaultRecentlyAddedMovies.png" widgetType="movies" widgetTarget="video">special://skin/extras/playlists/movies_recentlyadded.xsp</shortcut>
                  
[...]

            </node>

[...]               

        </node>
        <content>video</content>
        <node label="136">
            <content>playlist-video</content>
        </node>
        <node label="32075">
            <content>videosources</content>
            <content>upnp-video</content>
        </node>
    </node>

[...]

</widget-groupings>

My skin offers four different types of widget layouts (size of the widget as well as size/aspect ratio of the individual widget icons) defined by property="layout". For my widgetdefault default properties I can set the layout by adding corresponding propertydefaults with the same labelID.

Any idea how I can pre-define the layout property for shortcuts within the widget-groupings section?
Reply
(2020-05-22, 17:03)Chillbo Wrote: Maybe someone could help me with this:

I've got a list of widgets users can select from in my overrides.xml within <widget-groupings> part of that file. Under each defined node there're a few widgets defined via shortcuts like this:


<!-- Widget Grouping -->
<widget-groupings>
    <!-- Video -->
    <node label="3">
        <node label="$LOCALIZE[31178]" condition="Library.HasContent(movies) | Library.HasContent(tvshows)">
            <!-- Movies -->
            <node label="$LOCALIZE[342]" condition="Library.HasContent(movies)">
                <shortcut widget="NewMovies" label="$LOCALIZE[31179]" icon="DefaultRecentlyAddedMovies.png" widgetType="movies" widgetTarget="video">special://skin/extras/playlists/movies_recentlyadded.xsp</shortcut>
                  
[...]

            </node>

[...]               

        </node>
        <content>video</content>
        <node label="136">
            <content>playlist-video</content>
        </node>
        <node label="32075">
            <content>videosources</content>
            <content>upnp-video</content>
        </node>
    </node>

[...]

</widget-groupings>

My skin offers four different types of widget layouts (size of the widget as well as size/aspect ratio of the individual widget icons) defined by property="layout". For my widgetdefault default properties I can set the layout by adding corresponding propertydefaults with the same labelID.

Any idea how I can pre-define the layout property for shortcuts within the widget-groupings section?

you could read the files estuary mod shortcuts
that has the widgets layouts in Includes_Home.xml
Reply
(2020-05-23, 03:44)the_other_guy Wrote: you could read the files estuary mod shortcuts
that has the widgets layouts in Includes_Home.xml

I'm not sure I can follow. The Estuary Mod skin's overrides.xml as well as the widget layouts in its Includes_Home.xml look quite the same as mine in principle. But how do I define which layout a specific shortcut (pre-defined widget) should be shown with when being selected by a user?
The default widgets' layouts can be defined in the overrides.xml file via a propertydefault. Is there anything similar for shortcuts that can define a specific property for any shortcut? To me, it doesn't look like a propertydefault can be used for a shortcut.
Reply
i think you need them in template.xml for selectable widgets

i have  it set for 1 widget type on estuary default menus
Includes_Home.xml

<include name="WidgetListCategories2">
        <include content="CategoryLabel">
            <param name="label">$PARAM[widget_header]</param>
            <param name="label_focus">$PARAM[widget_header_focus]</param>
            <param name="list_id" value="$PARAM[list_id]"/>
            <param name="visible" value="$PARAM[visible]"/>
            <param name="pvr_submenu">false</param>
        </include>
        <include content="BusyListSpinner">
            <param name="list_id" value="$PARAM[list_id]"/>
            <param name="visible" value="$PARAM[visible]"/>
        </include>
        <onleft>9000</onleft>
        <control type="panel" id="$PARAM[list_id]">
            <left>0</left>
            <top>110</top>
            <right>0</right>
            <height>290</height>
            <include content="WidgetListCommon">
                <param name="list_id" value="$PARAM[list_id]"/>
            </include>
            <visible>$PARAM[visible]</visible>
                <visible>String.IsEmpty(Container(9000).ListItem.Property(HideSubMenu))</visible>
            <itemlayout width="240" height="240">
                <control type="group">
                    <control type="image">
                        <centertop>0</centertop>
                        <left>18</left>
                        <top>10</top>
                        <width>250</width>
                        <height>250</height>
                        <texture colordiffuse="99999999" fallback="$VAR[PosterThumbVar]">$INFO[ListItem.Icon]</texture>
                        <bordertexture border="21">overlays/shadow.png</bordertexture>
                        <visible>String.IsEqual(Skin.String(shortcutWidgetShape),0)</visible>
                        <bordersize>20</bordersize>
                        <aspectratio>keep</aspectratio>
                    </control>
                    <control type="image">
                        <centertop>0</centertop>
                        <left>18</left>
                        <top>10</top>
                        <width>250</width>
                        <height>250</height>
                        <texture colordiffuse="99999999" fallback="$VAR[PosterThumbVar]">$INFO[ListItem.Icon]</texture>
                        <bordertexture border="21">overlays/shadow1.png</bordertexture>
                        <visible>String.IsEqual(Skin.String(shortcutWidgetShape),1)</visible>
                        <bordersize>20</bordersize>
                        <aspectratio>keep</aspectratio>
                    </control>
                    <control type="image">
                        <centertop>0</centertop>
                        <left>18</left>
                        <top>10</top>
                        <width>250</width>
                        <height>250</height>
                        <texture colordiffuse="99999999" fallback="$VAR[PosterThumbVar]">$INFO[ListItem.Icon]</texture>
                        <bordertexture border="21">overlays/shadow2.png</bordertexture>
                        <visible>String.IsEqual(Skin.String(shortcutWidgetShape),2)</visible>
                        <bordersize>20</bordersize>
                        <aspectratio>keep</aspectratio>
                    </control>
                    <control type="image">
                        <centertop>0</centertop>
                        <left>18</left>
                        <top>10</top>
                        <width>250</width>
                        <height>250</height>
                        <texture colordiffuse="99999999" fallback="$VAR[PosterThumbVar]">$INFO[ListItem.Icon]</texture>
                        <bordertexture border="21" >overlays/shadow3.png</bordertexture>
                        <visible>String.IsEqual(Skin.String(shortcutWidgetShape),3)</visible>
                        <bordersize>20</bordersize>
                        <aspectratio>keep</aspectratio>
                    </control>
                    <control type="image">
                        <centertop>0</centertop>
                        <left>18</left>
                        <top>10</top>
                        <width>250</width>
                        <height>250</height>
                        <texture  fallback="$VAR[PosterThumbVar]">$INFO[ListItem.Icon]</texture>
                        <bordertexture border="21">overlays/shadow4.png</bordertexture>
                        <visible>String.IsEqual(Skin.String(shortcutWidgetShape),4)</visible>
                        <bordersize>20</bordersize>
                        <aspectratio>keep</aspectratio>
                    </control>
                </control>
            </itemlayout>
            <focusedlayout width="240" height="240">
                <control type="group">
                    <depth>DepthContentPopout</depth>
                    <animation type="Focus">
                        <effect type="zoom" start="100" end="115" time="500" tween="sine" easing="inout" center="120,120" />
                    </animation>
                    <animation type="Unfocus">
                        <effect type="zoom" start="115" end="100" time="500" tween="sine" easing="inout" center="120,120" />
                    </animation>
                    <control type="image">
                        <centertop>0</centertop>
                        <left>18</left>
                        <top>10</top>
                        <width>250</width>
                        <height>250</height>
                        <texture  fallback="$VAR[PosterThumbVar]">$INFO[ListItem.Icon]</texture>
                        <visible>String.IsEqual(Skin.String(shortcutWidgetShape),0)</visible>
                        <bordersize>20</bordersize>
                        <aspectratio>keep</aspectratio>
                    </control>
                    <control type="image">
                        <centertop>0</centertop>
                        <left>18</left>
                        <top>10</top>
                        <width>250</width>
                        <height>250</height>
                        <texture fallback="$VAR[PosterThumbVar]">$INFO[ListItem.Icon]</texture>
                        <bordertexture border="21">overlays/shadow1.png</bordertexture>
                        <visible>String.IsEqual(Skin.String(shortcutWidgetShape),1)</visible>
                        <bordersize>20</bordersize>
                        <aspectratio>keep</aspectratio>
                    </control>
                    <control type="image">
                        <centertop>0</centertop>
                        <left>18</left>
                        <top>10</top>
                        <width>250</width>
                        <height>250</height>
                        <texture  fallback="$VAR[PosterThumbVar]">$INFO[ListItem.Icon]</texture>
                        <bordertexture border="21">overlays/shadow2.png</bordertexture>
                        <visible>String.IsEqual(Skin.String(shortcutWidgetShape),2)</visible>
                        <bordersize>20</bordersize>
                        <aspectratio>keep</aspectratio>
                    </control>
                    <control type="image">
                        <centertop>0</centertop>
                        <left>18</left>
                        <top>10</top>
                        <width>250</width>
                        <height>250</height>
                        <texture  fallback="$VAR[PosterThumbVar]">$INFO[ListItem.Icon]</texture>
                        <bordertexture border="21">overlays/shadow3.png</bordertexture>
                        <visible>String.IsEqual(Skin.String(shortcutWidgetShape),3)</visible>
                        <bordersize>20</bordersize>
                        <aspectratio>keep</aspectratio>
                    </control>
                    <control type="image">
                        <centertop>0</centertop>
                        <left>18</left>
                        <top>10</top>
                        <width>250</width>
                        <height>250</height>
                        <texture fallback="$VAR[PosterThumbVar]">$INFO[ListItem.Icon]</texture>
                        <bordertexture border="21">overlays/shadow4.png</bordertexture>
                        <visible>String.IsEqual(Skin.String(shortcutWidgetShape),4)</visible>
                        <bordersize>20</bordersize>
                        <aspectratio>keep</aspectratio>
                    </control>
                </control>
            </focusedlayout>
            <content>
                <include>skinshortcuts-submenu</include>
            </content>
        </control>
    </include>


Home.xml

<include content="WidgetListCategories2" condition="Library.HasContent(movies) + !Skin.HasSetting(hide_tvshowscategory)">
                                <param name="widget_header" value="$LOCALIZE[31148]"/>
                            <param name="widget_header_focus" value="$INFO[Container(5900).ListItem.Label, | ]"/>
                            <param name="list_id" value="5901"/>
                            <param name="visible" value="!Skin.HasSetting(UseSmallerCategories)" />
                        </include>


Image
Reply
Unfortunately, I haven't found a way to easily pre-set the widget layout for pre-defined widgets offered in the overrides.xml. If anyone has an idea, I'd be very happy about it, but from what I can see, there's no proper way of doing this like there is for the template.xml widgets defined as the fallback home screen layout. Maybe this could be added in the future - defining different properties of widgets offered in the overrides.xml dialog? Angel
Reply
I need help!

Each home menu item has its own specific background (set in the SkinShortcuts dialog via control 310) that shows when that menu item is highlighted. I am trying to use the "id" property from the skinshortcuts-mainmenu include so that when I click on that menu item, the applicable background will show. I have a multi-image control that references the variable shown below.  I am pretty sure I have the code right, but its not working.  Any help/suggestions would be very much appreciated.

Here is the code I have (300 is the id of the home menu):

        <variable name="NestedHomeMenuItemBackground" type="text">
        <value condition="String.IsEqual(Container(300).Property(id),$NUMBER[1">) + !String.IsEmpty(Container(300).ListItem.Property(background))">$INFO[Container(300).ListItem.Property(background)]</value>
        <value condition="String.IsEqual(Container(300).Property(id),$NUMBER[2]) + !String.IsEmpty(Container(300).ListItem.Property(background))">$INFO[Container(300).ListItem.Property(background)]</value>
        <value condition="String.IsEqual(Container(300).Property(id),$NUMBER[3]) + !String.IsEmpty(Container(300).ListItem.Property(background))">$INFO[Container(300).ListItem.Property(background)]</value>
        <value condition="String.IsEqual(Container(300).Property(id),$NUMBER[4]) + !String.IsEmpty(Container(300).ListItem.Property(background))">$INFO[Container(300).ListItem.Property(background)]</value>
        <value condition="String.IsEqual(Container(300).Property(id),$NUMBER[5]) + !String.IsEmpty(Container(300).ListItem.Property(background))">$INFO[Container(300).ListItem.Property(background)]</value>
</variable>

Please note that for some reason there is an error in the way the code is printing in this forum (on line 2).  This error is not present in my code.
Reply
Sorry if this has been discussed before or even is available somewhere else. 
I'm looking to see if I can add the ability to cache a menu or widget to disk so that when my skin initially loads it has some content available instead of blank lists. And then reload the data later. It should also help on lower end hardware where many plugins are used in widgets as these could be loaded at a slower rate?
Reply
  •   
  • 1
  • 130
  • 131
  • 132
  • 133
  • 134(current)



Logout Mark Read Team Forum Stats Members Help
script.skinshortcuts8
This forum uses Lukasz Tkacz MyBB addons.