Kodi Community Forum

Full Version: Problem with "SubString"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
i try to hide the OSD while a Startup video is playing via:

Code:
<visible>!SubString(Player.path,Skin.String(Startup_Video_Path))</visible>

did also try:

Code:
<visible>!SubString(Player.path,Skin.String(Startup_Video_Path),left)</visible>

none of them work.

Have already checked both as Labels, and both return the expected values, so no Idea why this shuldnt work. Huh






---

EDIT:

As a Workaround i did also try to let the Video play in a overlaying Custom Window. But as u may gues this didnt work to.

Code:
<window type="dialog" id="57">
    
    <zorder>2</zorder>
    
    <!--
    <visible>true</visible>
    -->
    
    <controls>

        <!-- Video Window - Startup -->
        <control type="videowindow">
            <left>0</left>
            <top>0</top>
            <width>1920</width>
            <height>1080</height>
            <visible></visible>
        </control>
        

    </controls>

</window>


(Didnt waste to much time for this methode thil now...)
Probably because you should be using
PHP Code:
Player.Folderpath 
Wink
(2016-02-16, 18:06)Hitcher Wrote: [ -> ]Probably because you should be using
PHP Code:
Player.Folderpath 
Wink

Lol. looks like im lost without the wiki, but did already try this without sucess, in fact i did juse "Folderpath" already

So, No, doesnt do the trick.

I did show both (String and "Player,Folderpath" as labels and they return similar path structures.
should it be $INFO[Skin.String(stringname)]?
Ah yeah, missed that badass. It should be -

PHP Code:
<visible>!SubString(Player.Folderpath,$INFO[Skin.String(stringname)])</visible
Really?

I use a lot of lines such as "StringCompare(Container.FolderPath,Skin.String(4000-WidgetList-1))" without any $INFO[] tag.

Example:
Code:
<variable name="HeadingLabel">
        <value condition="!IsEmpty(Skin.String(1000-WidgetLabel-1)) + StringCompare(Container.FolderPath,Skin.String(1000-WidgetList-1))">$INFO[Skin.String(1000-WidgetLabel-1)]</value>
        <value condition="!IsEmpty(Skin.String(1000-WidgetLabel-2)) + StringCompare(Container.FolderPath,Skin.String(1000-WidgetList-2))">$INFO[Skin.String(1000-WidgetLabel-2)]</value>
        <value condition="!IsEmpty(Skin.String(1000-WidgetLabel-3)) + StringCompare(Container.FolderPath,Skin.String(1000-WidgetList-3))">$INFO[Skin.String(1000-WidgetLabel-3)]</value>
        <value condition="!IsEmpty(Skin.String(1000-WidgetLabel-4)) + StringCompare(Container.FolderPath,Skin.String(1000-WidgetList-4))">$INFO[Skin.String(1000-WidgetLabel-4)]</value>
        <value condition="!IsEmpty(Skin.String(1000-WidgetLabel-5)) + StringCompare(Container.FolderPath,Skin.String(1000-WidgetList-5))">$INFO[Skin.String(1000-WidgetLabel-5)]</value>
        <value condition="!IsEmpty(Skin.String(1000-WidgetLabel-6)) + StringCompare(Container.FolderPath,Skin.String(1000-WidgetList-6))">$INFO[Skin.String(1000-WidgetLabel-6)]</value>
...
</variable

That works well.
Yeah you're totally right, only needed for $LOCALIZE[..].
Meh, ah well... I reliinquish my skilled skinner title lol Wink
(2016-02-16, 20:12)badaas Wrote: [ -> ]should it be $INFO[Skin.String(stringname)]?

Ha,..

This is against to what i learnd, BUT! exactly this did the Trick! (To try something like this, was totaly out of my Scope Smile )

Thanks.

However, seems this is only the case for "SubString" and $INFO[foo] seems not neded for StringCompare.
(Maybe a Bug or was this the case since ever?)
Dunno, but good to know Smile
Sry. but still not solved!

by using "$INFO[] Hack"
Code:
<visible>!SubString(Player.Filenameandpath,extras/startupvideo.mp4,right) + !SubString($INFO[Skin.String(Startup_Video_Path)],Player.FolderPath)</visible>

The OSD is hidden while the startvideo is playing, but also hidden no mather which Video plays.


Could it be that SubString is broken? or simply not work with "Skin.String" in it? I've got other Problems wit "SubString" thogether with Skin.String on other places in the Skin!

Undecided
stringcompare does support comparing two infolabels.
substring only supports comparing an infolabel to a textstring.

no bug, always been like that ;-)
o.k.

So im out of Ideas.

any suggestions on how to hide the OSD while the Startup Video is playing?
perhaps you can set a window property in Startup.xml
use this property as a visible condition in VideoOSD.xml
and clear the property when VideoFullScreen.xml unloads?
yer could be a Idea but how to set the property if the conditon cant be a SbuString(String(blablub),Label

<onload condition=""

My Startup.xml looks like this:

Code:
<window>
    <!-- startup -->
    <onload>Skin.Reset(HideSettings)</onload>
    <!--
    <onload>ReplaceWindow($INFO[System.StartupWindow])</onload>
    -->
    <defaultcontrol always="true">10</defaultcontrol>
    
    <controls>

<control type="button" id="10">
            <description>trigger with startup Video</description>
            <onfocus condition="!IsEmpty(Skin.String(Startup_Video_Path)) + Skin.HasSetting(UseCustomStartupVideo)">XBMC.PlayMedia($INFO[Skin.String(Startup_Video_Path)])</onfocus>
            <onfocus condition="IsEmpty(Skin.String(Startup_Video_Path)) | !Skin.HasSetting(UseCustomStartupVideo)">XBMC.PlayMedia(special://skin/extras/startupvideo.mp4)</onfocus>
            <onfocus>ReplaceWindow($INFO[System.StartupWindow])</onfocus>
            <texturenofocus>-</texturenofocus>
            <texturefocus>-</texturefocus>
            <visible>!Skin.HasSetting(DontUseStartupVideo)</visible>
        </control>

    </controls>
    
</window>
Pages: 1 2