Some New Features
#7
Ok there was a way to make it conditional if you remove the button. Like I said above it is a hackish way of doing it but it will prevent accidentally restarting the song. In addition it will prevent activation if anything other than a different theme.mp3 file is playing.

Open

Common Video Library Views.xml

Find:
Code:
<control type="button" id="1337">
                <posx>535</posx>
                <posy>20</posy>
                <width>180</width>
                <height>50</height>
                <font>Heading-M</font>
                <textcolor>white</textcolor>
                <shadowcolor>black</shadowcolor>
                <align>center</align>
                <aligny>center</aligny>
                <label>$INFO[ListItem.label]</label>
                <scroll>true</scroll>
                <visible>IsEmpty(Control.GetLabel(77020))</visible>
                <visible>container.content(tvshows) + Control.IsVisible(537)</visible>
                <visible>Skin.HasSetting(TV Poster)</visible>
                <animation effect="fade" time="200">WindowClose</animation>
                <colordiffuse>ddffffff</colordiffuse>
                <onclick>PlayMedia($INFO[ListItem.Path]/pv.mkv)</onclick>
                <onleft>2</onleft>
                <onright>2</onright>
                <onup>2</onup>
                <ondown>537</ondown>
            </control>

Replace with:

Code:
<control type="button" id="1337">
                <description>Default Version, plays theme.mp3 on selection</description>
                <visible>!Player.Playing | [SubString(Player.Filenameandpath,theme.mp3) + !StringCompare(Player.Folderpath,ListItem.Path)]</visible>
                <visible>!Player.Playing | SubString(Player.Filenameandpath,theme.mp3)</visible>
                <posx>535</posx>
                <posy>20</posy>
                <width>180</width>
                <height>50</height>
                <font>Heading-M</font>
                <textcolor>white</textcolor>
                <shadowcolor>black</shadowcolor>
                <align>center</align>
                <aligny>center</aligny>
                <label>$INFO[ListItem.label]</label>
                <scroll>true</scroll>
                <visible>IsEmpty(Control.GetLabel(77020))</visible>
                <visible>container.content(tvshows) + Control.IsVisible(537)</visible>
                <visible>Skin.HasSetting(TV Poster)</visible>
                <animation effect="fade" time="200">WindowClose</animation>
                <colordiffuse>ddffffff</colordiffuse>
                <onclick>PlayMedia($INFO[ListItem.Path]/pv.mkv)</onclick>
                <onfocus>XBMC.RunScript(script.TvTunes,backend=True&amp;loop=True)</onfocus>
                <onfocus>PlayMedia($INFO[ListItem.Path]/theme.mp3,1)</onfocus>
                <onleft>2</onleft>
                <onright>2</onright>
                <onup>2</onup>
                <ondown>537</ondown>
            </control>
            
            <control type="button" id="1337">
                <description>If content is already playing, disable theme.mp3 start unless it is a different theme</description>
                <visible>[Player.Playing + !SubString(Player.Filenameandpath,theme.mp3)] | [Player.Playing + SubString(Player.Filenameandpath,theme.mp3) + StringCompare(Player.Folderpath,ListItem.Path)]</visible>
                <posx>535</posx>
                <posy>20</posy>
                <width>180</width>
                <height>50</height>
                <font>Heading-M</font>
                <textcolor>white</textcolor>
                <shadowcolor>black</shadowcolor>
                <align>center</align>
                <aligny>center</aligny>
                <label>$INFO[ListItem.label]</label>
                <scroll>true</scroll>
                <visible>IsEmpty(Control.GetLabel(77020))</visible>
                <visible>container.content(tvshows) + Control.IsVisible(537)</visible>
                <visible>Skin.HasSetting(TV Poster)</visible>
                <animation effect="fade" time="200">WindowClose</animation>
                <colordiffuse>ddffffff</colordiffuse>
                <onclick>PlayMedia($INFO[ListItem.Path]/pv.mkv)</onclick>
                <onfocus>XBMC.RunScript(script.TvTunes,backend=True&amp;loop=True)</onfocus>
                <onleft>2</onleft>
                <onright>2</onright>
                <onup>2</onup>
                <ondown>537</ondown>
            </control>

save and close.


This type of conditional statement could also be used for making it so that from a skin level the same theme.mp3 can be set to play from multiple overlapping locations without causing the song to restart from the beginning. This also completely avoids all the current limitations from the existing tvtheme script.

Currently the only limitation of this method is I am not aware of any way to dynamically control volume with it but there may be a simple hack around that too! Muahahaha Wink

NOTE* the rar file in the first post has been updated to reflect the latest changes.
Reply


Messages In This Thread
Some New Features - by ZERO &lt;ibis&gt; - 2011-04-28, 00:26
[No subject] - by ZERO &lt;ibis&gt; - 2011-04-28, 00:27
[No subject] - by ZERO &lt;ibis&gt; - 2011-04-28, 00:29
[No subject] - by ZERO &lt;ibis&gt; - 2011-04-28, 00:55
[No subject] - by Sharpe - 2011-04-28, 01:48
[No subject] - by ZERO &lt;ibis&gt; - 2011-04-28, 02:26
[No subject] - by ZERO &lt;ibis&gt; - 2011-04-28, 03:13
[No subject] - by Sharpe - 2011-04-28, 03:46
[No subject] - by ZERO &lt;ibis&gt; - 2011-04-28, 04:45
[No subject] - by kiboy6 - 2011-05-02, 11:40
[No subject] - by ZERO &lt;ibis&gt; - 2011-05-05, 09:24
[No subject] - by Sharpe - 2011-05-06, 00:14
[No subject] - by ZERO &lt;ibis&gt; - 2011-10-30, 06:56
Logout Mark Read Team Forum Stats Members Help
Some New Features0