2021-06-24, 22:48
(2021-06-24, 22:12)bsoriano Wrote:(2021-06-24, 13:55)nfm886 Wrote:@"nfm886" , you do not need any addon to implement a "Show Fanart" button in the video info dialog that shows either a single fanart or up to x extra fanarts. The extra fanarts just need to be loaded into the Kodi db, and named fanartxx.yyy as per the Kodi Matrix documentation. I do this in Amber today.(2021-06-24, 13:25)jokero009 Wrote: I honestly don't even remember where she was, but I think it was possible in the place where the widgets are selected in the library at the top) Where else is there a lock for widgets, or you can make a function like "Show additional fanart" right inside the skin settings. please, if anything .. But I really like this featureAhh, now I know and remember. This extra fanart button is gone when we dropped Skin Helper dependency. I'm not sure if it's possible to implement this using some other addons. I will check it.
Here's what the code for the button could be like. Obviously, you need to adapt it to the look and layout of your skin.
xml:
<control type="button" id="297" description="Extras">
<height>90</height>
<width min="190">auto</width>
<align>center</align>
<font>Details</font>
<label>$LOCALIZE[32135]</label>
<onclick>SetProperty(fanart,$ESCINFO[ListItem.Art(fanart)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart1,$ESCINFO[ListItem.Art(fanart1)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart2,$ESCINFO[ListItem.Art(fanart2)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart3,$ESCINFO[ListItem.Art(fanart3)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart4,$ESCINFO[ListItem.Art(fanart4)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart5,$ESCINFO[ListItem.Art(fanart5)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart6,$ESCINFO[ListItem.Art(fanart6)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart7,$ESCINFO[ListItem.Art(fanart7)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart8,$ESCINFO[ListItem.Art(fanart8)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart9,$ESCINFO[ListItem.Art(fanart9)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart10,$ESCINFO[ListItem.Art(fanart10)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart11,$ESCINFO[ListItem.Art(fanart11)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart12,$ESCINFO[ListItem.Art(fanart12)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart13,$ESCINFO[ListItem.Art(fanart13)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart14,$ESCINFO[ListItem.Art(fanart14)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart15,$ESCINFO[ListItem.Art(fanart15)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart16,$ESCINFO[ListItem.Art(fanart16)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart17,$ESCINFO[ListItem.Art(fanart17)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart18,$ESCINFO[ListItem.Art(fanart18)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart19,$ESCINFO[ListItem.Art(fanart19)],home)</onclick>
<onclick condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetProperty(fanart20,$ESCINFO[ListItem.Art(fanart20)],home)</onclick>
<onclick>ActivateWindow(1126)</onclick>
<visible>!Skin.HasSetting(KioskMode.Enabled)</visible>
<visible>!String.IsEmpty(Listitem.DBID)</visible>
</control>
And this is the code for the custom dialog to show the fanart and extra fanart (my apologies for the long code snippet):
xml:
<?xml version="1.0" encoding="utf-8"?>
<window type="dialog" id="1126">
<animation effect="fade" start="0" end="100" time="400">WindowOpen</animation>
<animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
<onload condition="Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetFocus(91506)</onload>
<onload condition="!Skin.HasSetting(SkinHelper.EnableExtraFanart)">SetFocus(3000)</onload>
<onunload>ClearProperty(fanart,Home)</onunload>
<onunload>ClearProperty(fanart1,Home)</onunload>
<onunload>ClearProperty(fanart2,Home)</onunload>
<onunload>ClearProperty(fanart3,Home)</onunload>
<onunload>ClearProperty(fanart4,Home)</onunload>
<onunload>ClearProperty(fanart5,Home)</onunload>
<onunload>ClearProperty(fanart6,Home)</onunload>
<onunload>ClearProperty(fanart7,Home)</onunload>
<onunload>ClearProperty(fanart8,Home)</onunload>
<onunload>ClearProperty(fanart9,Home)</onunload>
<onunload>ClearProperty(fanart10,Home)</onunload>
<onunload>ClearProperty(fanart11,Home)</onunload>
<onunload>ClearProperty(fanart12,Home)</onunload>
<onunload>ClearProperty(fanart13,Home)</onunload>
<onunload>ClearProperty(fanart14,Home)</onunload>
<onunload>ClearProperty(fanart15,Home)</onunload>
<onunload>ClearProperty(fanart16,Home)</onunload>
<onunload>ClearProperty(fanart17,Home)</onunload>
<onunload>ClearProperty(fanart18,Home)</onunload>
<onunload>ClearProperty(fanart19,Home)</onunload>
<onunload>ClearProperty(fanart20,Home)</onunload>
<controls>
<control type="group">
<visible>!Skin.HasSetting(SkinHelper.EnableExtraFanart)</visible>
<control type="image">
<include>Dimensions_Fullscreen</include>
<aspectratio>scale</aspectratio>
<texture>colors/black.png</texture>
</control>
<control type="image">
<include>Dimensions_Fullscreen</include>
<aspectratio>keep</aspectratio>
<texture>$INFO[Window(home).Property(fanart)]</texture>
</control>
<control type="button" id="3000">
<include>HiddenButton</include>
<onclick>Action(close)</onclick>
</control>
</control>
<control type="group">
<visible>Skin.HasSetting(SkinHelper.EnableExtraFanart)</visible>
<control type="list" id="9105">
<itemlayout />
<focusedlayout />
<posx>-20</posx>
<posy>-20</posy>
<width>1</width>
<height>1</height>
<content>
<item>
<label>$INFO[Window(home).Property(fanart)]</label>
</item>
<item>
<label>$INFO[Window(home).Property(fanart1)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart1))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart2)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart2))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart3)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart3))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart4)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart4))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart5)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart5))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart6)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart6))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart7)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart7))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart8)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart8))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart9)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart9))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart10)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart10))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart11)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart11))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart12)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart12))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart13)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart13))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart14)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart14))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart15)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart15))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart16)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart16))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart17)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart17))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart18)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart18))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart19)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart19))</visible>
</item>
<item>
<label>$INFO[Window(home).Property(fanart20)]</label>
<visible>!String.IsEmpty(Window(home).Property(fanart20))</visible>
</item>
</content>
</control>
<control type="button" id="91506">
<include>HiddenButton</include>
<onleft>Control.Move(9105,-1)</onleft>
<onright>Control.Move(9105,1)</onright>
<onclick>Action(Close)</onclick>
</control>
<control type="group">
<animation effect="fade" start="0" end="100" time="350" tween="cubic" easing="inout">Visible</animation>
<animation effect="fade" start="100" end="0" time="350" tween="cubic" easing="inout">Hidden</animation>
<visible>Control.HasFocus(91506)</visible>
<control type="image">
<width>1920</width>
<height>1080</height>
<texture>img/blackdot1.png</texture>
<aspectratio>scale</aspectratio>
</control>
<control type="image">
<aspectratio>keep</aspectratio>
<texture background="true">$INFO[Container(9105).ListItem.Label]</texture>
</control>
<control type="image">
<visible>Container(9105).HasPrevious</visible>
<left>0</left>
<top>1000</top>
<width>34</width>
<height>34</height>
<texture flipx="false" colordiffuse="$VAR[HighlightColor]">icons/spin-left.png</texture>
<animation effect="fade" time="300" start="100" end="0" condition="System.IdleTime(2)">Conditional</animation>
</control>
<control type="image">
<visible>Container(9105).HasNext</visible>
<left>1880</left>
<top>1000</top>
<width>34</width>
<height>34</height>
<texture flipx="true" colordiffuse="$VAR[HighlightColor]">icons/spin-left.png</texture>
<animation effect="fade" time="300" start="100" end="0" condition="System.IdleTime(2)">Conditional</animation>
</control>
</control>
</control>
</controls>
</window>
As you can see from the code above, this will display up to 20 extra fanart, as long as they are loaded in the db as fanart1, fanart2, etc.
Regards,
Bart
Oh man! Thanks!
I did not know Tomorrow I will analyze this since my mind will be cleaner ^^