thumb fallback with Skin.SetImage
#1
Hello

How to use thumb fallback?
This is my code

<control type="button" id="3045">
<description>Single Image button</description>
...
<label2>$INFO[Skin.String(Home_Custom_Background)]</label2>
<onclick>Skin.SetImage(Home_Custom_Background)</onclick>
</control>


With this Button, I can set image path and it saved at Skin.String(Home_Custom_Background).
Then I will use this my one of my items

<item id="1">
<description>LiveTV</description>
...
<thumb fallback="$INFO[Skin.String(Home_Custom_Background)">$INFO[Skin.String(Home_Custom_Back_TV_Folder)]</thumb>
</item>


But it does not work(not display my custom image). Please help me out.
Reply
#2
you can't use an infolabel as a fallback image, it has to be fixed filename.

perhaps you can work around this by using a $VAR[], as explained in this post:
https://forum.kodi.tv/showthread.php?tid...pid2542580
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2021-10-16, 10:47)ronie Wrote: you can't use an infolabel as a fallback image, it has to be fixed filename.

perhaps you can work around this by using a $VAR[], as explained in this post:
https://forum.kodi.tv/showthread.php?tid...pid2542580
Oh, I see.it works. Thank you.


<variable name="Backgroundfallback">
  <value condition="Skin.String(Home_Custom_Back_TV_Folder)">$INFO[Skin.String(Home_Custom_Back_TV_Folder)]</value>
  <value>$INFO[Skin.String(Home_Custom_Background)]</value>
</variable>
<item id="1">
  ...
  <thumb>$VAR[Backgroundfallback]</thumb>
  ...
  </item>
Reply
#4
(2021-10-16, 10:47)ronie Wrote: you can't use an infolabel as a fallback image, it has to be fixed filename.

perhaps you can work around this by using a $VAR[], as explained in this post:
https://forum.kodi.tv/showthread.php?tid...pid2542580

One question,

Can I make the default skin backfround image path with Button?

<control type="button" id="3045">
   <label>Background</label>
   <label2>$INFO[Skin.String(Home_Custom_Background)]</label2>
   <onclick>Skin.SetImage(Home_Custom_Background)</onclick>
</control>

This is a button for changing skin background with Skin.SetImage(Home_Custom_Background), but when I have installed skin at first, I would like to display the default image for my skin background.
Reply
#5
(2021-10-16, 12:24)kenmoon Wrote: This is a button for changing skin background with Skin.SetImage(Home_Custom_Background), but when I have installed skin at first, I would like to display the default image for my skin background.

@kenmoon , you could set Home_Custom_Background to your default image path in the startup.xml of your skin, as it should be empty on first install.

Regards,

Bart
Amber Maintainer
Main HTPC: Intel Core i7, 32GB, nVidia GTX1080, Windows 11 Soundbar: Samsung HW-Q950A TV: LG CX Kodi: 19.3 Skin: Amber
Reply



Logout Mark Read Team Forum Stats Members Help
thumb fallback with Skin.SetImage0
This forum uses Lukasz Tkacz MyBB addons.