Some New Features

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ZERO <ibis> Offline
Senior Member
Posts: 268
Joined: May 2010
Reputation: 1
Post: #1
So as some of you may have known I have been working on some new features for this skin. This is mainly driven by my personal vision of cool features that I would like to have due largely to the type of content I use xbmc for which is anime. These changes could be made to other skins as they are universal in nature however I will detail them below and then list how they were made and also provide the attached files for those interested.

NOTE THAT THIS IS ONLY FOR FANART view. You will need to implement the changes yourself if you want it for a different one.

Features:
Studio listing for tv shows on the main navigation directly under the title of the show.
Show title made into a button that will play the file pv.mkv when pressed. (for preview support)
Show title will play theme.mp3 when highlighted.

If theme.mp3 is playing via this method then:
No preview overlay will be displayed
Music overlay will show a slideshow of the contents of extrafanart or a black screen if that folder is empty
Any visualization will be replaced with the slideshow mentioned above.

I have really enjoyed these changes personally and I hope you all will as well. Perhaps they could be implemented in a better way into the official skin so that everyone can enjoy it and be able to easily toggle it on and off.

The files will be linked to this post and instructions will appear in the posts below if you want to read how and what I edited. Remember that the files are from the PAL16x9 folder.
ibisgaming.com/media/newoptions.rar
(This post was last modified: 2011-04-28 00:58 by ZERO <ibis>.)
find quote
ZERO <ibis> Offline
Senior Member
Posts: 268
Joined: May 2010
Reputation: 1
Post: #2
First to have studio show up in Fan Art view. It will display right below the show title and above the first line. I think it produces a nice effect to see the title and studio together like that.

Here is the instructions:

Open Common Video Library Views.xml in PAL16x9

Then within the section <include name="FanArt View"> find:

Code:
<control type="label">
                <posx>535</posx>
                <posy>20</posy>
                <width>180</width>
                <height>65</height>
                <font>Heading-M</font>
                <textcolor>white</textcolor>
                <shadowcolor>black</shadowcolor>
                <align>center</align>
                <aligny>center</aligny>
                <label>$INFO[ListItem.TVShowTitle]</label>
                <scroll>true</scroll>
                <visible>[IsEmpty(Control.GetLabel(77025)) + IsEmpty(Control.GetLabel(77024))]</visible>
                <visible>container.content(episodes) + Control.IsVisible(540)</visible>
                <visible>Skin.HasSetting(TV Poster)</visible>
                <animation effect="fade" time="200">WindowClose</animation>
</control>

Then below which should be about line 10727 add:

Code:
<control type="label">
                <description>Studio label</description>
                <posx>535</posx>
                <posy>75</posy>
                <width>45</width>
                <height>16</height>
                <font>font64</font>
                <textcolor>grey</textcolor>
                <align>left</align>
                <label>$LOCALIZE[572]:</label>
                <visible>container.content(tvshows)</visible>
                <visible>Control.IsVisible(537)</visible>
                <visible>Skin.HasSetting(TV Poster)</visible>
                <visible>!IsEmpty(ListItem.foldername)</visible>
                <animation effect="fade" time="200">WindowClose</animation>
            </control>
            
            <control type="label">
                <description>Studio value</description>
                <posx>715</posx>
                <posy>75</posy>
                <width>135</width>
                <height>16</height>
                <font>font64</font>
                <textcolor>white</textcolor>
                <shadowcolor>black</shadowcolor>
                <align>right</align>
                <label fallback="416">$INFO[ListItem.Studio]</label>
                <scroll>true</scroll>
                <visible>container.content(tvshows)</visible>
                <visible>Control.IsVisible(537)</visible>
                <visible>Skin.HasSetting(TV Poster)</visible>
                <visible>!IsEmpty(ListItem.foldername)</visible>
                <animation effect="fade" time="200">WindowClose</animation>
            </control>

Save and your done!
find quote
ZERO <ibis> Offline
Senior Member
Posts: 268
Joined: May 2010
Reputation: 1
Post: #3
Next is the preview support, just do the following:

Open Common Video Library Views.xml
Locate line 10634

Then replace:
Code:
<control type="label">
                <posx>535</posx>
                <posy>20</posy>
                <width>180</width>
                <height>65</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>
            </control>

With:
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>

Then search for id="537"

Replace:
Code:
<onup>2</onup>

With:
<onup>1337</onup>

Remember that for this to work your file must be called pv.mkv also note that the size of the label has been changed from the default height of 65 in order to look nice with the studio label. If you want it the default just change 50 in height back to 65.
find quote
ZERO <ibis> Offline
Senior Member
Posts: 268
Joined: May 2010
Reputation: 1
Post: #4
Ok now time for the theme.mp3 support and the special fan art mode:

Open Common Video Library Views.xml

Find:
Code:
<onclick>PlayMedia($INFO[ListItem.Path]/pv.mkv)</onclick>

Then below add:
Code:
<onfocus>XBMC.RunScript(script.TvTunes,backend=True&amp;loop=True)</onfocus>
<onfocus>PlayMedia($INFO[ListItem.Path]/theme.mp3,1)</onfocus>

Save and close.

Then open includes.xml

Find:
Code:
<visible>!SubString(Window(10025).Property(TvTunesIsAlive),True)</visible>

Then below add:
Code:
<visible>!SubString(Player.Filenameandpath,theme.mp3)</visible>

Save and close.

Now for the fan art parts! This first file will display images from extrafanart until the screensaver activates. Open MusicOverlay.xml

Find:
Code:
<controls>

Then below add:
Code:
<control type="group">
            <visible>SubString(Player.Filenameandpath,theme.mp3)</visible>
            
            <control type="multiimage">
                <description>Ronie's dirty hack for showing fanart slideshow instead of visualisation :)</description>
                <posx>0</posx>
                <posy>0</posy>
                <width>720</width>
                <height>576</height>
                <timeperimage>8000</timeperimage>
                <fadetime>2000</fadetime>
                <imagepath fallback="menu-background.png" background="true">$INFO[Player.Folderpath]/extrafanart/</imagepath>
                <aspectratio>scale</aspectratio>
                <visible>Player.HasAudio</visible>
                <include>Slideshow Ken Burns Toggle</include>
            </control>

            <control type="multiimage">
                <description>Ronie's dirty hack for showing fanart slideshow instead of visualisation :)</description>
                <posx>0</posx>
                <posy>0</posy>
                <width>720</width>
                <height>576</height>
                <timeperimage>8000</timeperimage>
                <fadetime>750</fadetime>
                <imagepath fallback="menu-background.png" background="true">$INFO[Player.Folderpath]/extrafanart/</imagepath>
                <aspectratio>scale</aspectratio>
                <visible>Player.HasAudio</visible>
                <include>Slideshow Ken Burns Toggle</include>
            </control>

            </control>

Then find:
Code:
<control type="group">
            <visible>!SubString(Window(10025).Property(TvTunesIsAlive),True)</visible>

Below add:
Code:
<visible>!SubString(Player.Filenameandpath,theme.mp3)</visible>

Then find:
Code:
<control type="group">

            <posx>0</posx>
            <posy>506</posy>
            <visible>!SubString(Window(10025).Property(TvTunesIsAlive),True)</visible>

Below add:
Code:
<visible>!SubString(Player.Filenameandpath,theme.mp3)</visible>

Save and close.

Now this last file will allow you to continue to see the fan art if your screensaver activates AND you have visualizations enabled for when a screensaver and music are occurring at the same time. Also keep in mind that enabling visualizations will BREAK tvtunes causing it to loop. This fact has caused me to think that perhaps the entire way that tvtunes even works should be ditched as it appears that more features and playback options are available by implementing playback from within the skin directly and just using tvtunes to get the music (which I do not even do b/c it is useless for anime).

Open MusicVisualisation.xml

Find:
Code:
<controls>

Below that add:
Code:
<control type="group">
            <visible>SubString(Player.Filenameandpath,theme.mp3)</visible>
            
            <control type="multiimage">
                <description>Ronie's dirty hack for showing fanart slideshow instead of visualisation :)</description>
                <posx>0</posx>
                <posy>0</posy>
                <width>720</width>
                <height>576</height>
                <timeperimage>8000</timeperimage>
                <fadetime>2000</fadetime>
                <imagepath fallback="menu-background.png" background="true">$INFO[Player.Folderpath]/extrafanart/</imagepath>
                <aspectratio>scale</aspectratio>
                <visible>Player.HasAudio</visible>
                <include>Slideshow Ken Burns Toggle</include>
            </control>

            <control type="multiimage">
                <description>Ronie's dirty hack for showing fanart slideshow instead of visualisation :)</description>
                <posx>0</posx>
                <posy>0</posy>
                <width>720</width>
                <height>576</height>
                <timeperimage>8000</timeperimage>
                <fadetime>750</fadetime>
                <imagepath fallback="menu-background.png" background="true">$INFO[Player.Folderpath]/extrafanart/</imagepath>
                <aspectratio>scale</aspectratio>
                <visible>Player.HasAudio</visible>
                <include>Slideshow Ken Burns Toggle</include>
            </control>

            </control>

Then find:
Code:
<control type="group">
            <animation delay="3000" effect="fade" time="200">WindowClose</animation>
            <visible>Player.HasAudio</visible>

Below add:
Code:
<visible>!SubString(Player.Filenameandpath,theme.mp3)</visible>

save and close!

That is it, your all done!
find quote
Sharpe Online
Skilled Skinner
Posts: 1,029
Joined: Jul 2006
Reputation: 13
Location: North West England
Post: #5
Oh that's some good work ZERO <ibis> - especially like what you've been doing with the tvtunes.

When work gets a bit less hectic over the next couple of weeks I'll sit down and have a real close look at your mods with a view to incorporating what I can.

Cheers and thanks again.
find quote
ZERO <ibis> Offline
Senior Member
Posts: 268
Joined: May 2010
Reputation: 1
Post: #6
Thanks, from my work on this I am starting to get the feeling that the entire way that tvtunes handles playback in general should be abandoned and that it should instead be done by the skin directly. The real issue I have run into is the ability to have if statements. I wish I could do (or perhaps I can) make something like this:
Code:
<onfocus>
if(condition)
{
PlayMedia($INFO[ListItem.Path]/theme.mp3,1)
}
</onfocus>

Does anyone know if there is a way to have nested conditions like this for skins. B.c if someone can tell me how to do this I can really make some awesome features!

Actually I think I just came up with a hackish way of doing this. will update this thread if it works.
(This post was last modified: 2011-04-28 02:34 by ZERO <ibis>.)
find quote
ZERO <ibis> Offline
Senior Member
Posts: 268
Joined: May 2010
Reputation: 1
Post: #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.
(This post was last modified: 2011-04-28 03:15 by ZERO <ibis>.)
find quote
Sharpe Online
Skilled Skinner
Posts: 1,029
Joined: Jul 2006
Reputation: 13
Location: North West England
Post: #8
Oh one thing to watch out for - the new version of the TV Tunes script used in the official XBMC repo has changed names - it's now script.tvtunes rather than script.TvTunes (the lowercasing is critical) - I'm in the process of updating Back Row in the XBMC repo so it will switch to using the version of tvtunes in the XBMC repo when that happens.
find quote
ZERO <ibis> Offline
Senior Member
Posts: 268
Joined: May 2010
Reputation: 1
Post: #9
Oh, I have that thing totally disabled. The skin changes I made also have no dependencies on the actual program either. The only thing that these changes need is a file called theme.mp3 and pv.mkv in the same folder as the episodes for the show as well as some images in the extrafanart folder if you want to use that feature.

Due to the changes I posted here tvtunes is totally useless to me now and so I have disabled it on my xbmc version.
find quote
kiboy6 Offline
Fan
Posts: 632
Joined: Mar 2009
Reputation: 0
Post: #10
Cool changes Zero<ibis>.

Problem with doing away with the tv-tunes script is that future show theme tunes will have to be downloaded manually and the volume limiting option won't be there.

But it is much cooler having the tune play just when the show is "hovered" on.

Thanks!
find quote
ZERO <ibis> Offline
Senior Member
Posts: 268
Joined: May 2010
Reputation: 1
Post: #11
In my case tvtunes can not find music for any of my content anyways. For other users they could enable it just to find the content and then disable it. The issue of it causing a loop with the screensaver is not a problem with this skin it is a problem of the screensaver and tvtunes. As for lowering the volume tvtunes just lowers the xbmc volume and then puts it back. The skin could be coded to preform the same action if a user so wanted.

However, I have come up with a more interactive idea where when you click the title of the show you then can select between playing the theme song, watching a preview or ops/eds or even viewing sound tracks for the show.

I recognize that normal users would not have this sort of content however for those of us that use XBMC to manage our anime collections these features are like a wet dream. What I need to figure out is how to display the contents of a folder within a popup box.

In the summer I plan to really expand the feature set of the title button option and hopefully it will be modified and added to the official build.
(This post was last modified: 2011-05-05 09:28 by ZERO <ibis>.)
find quote
Sharpe Online
Skilled Skinner
Posts: 1,029
Joined: Jul 2006
Reputation: 13
Location: North West England
Post: #12
Cool - looking forward to seeing what you come with.
find quote
ZERO <ibis> Offline
Senior Member
Posts: 268
Joined: May 2010
Reputation: 1
Post: #13
As should be obvious I got crazy busy and was not able to do any work on this mod all summer.

I noticed that it no longer works with the latest versions of this skin. When I switch to eden I will be trying to update this mod (hopefully with some help from the author) to support the latest version.

I was wondering, if when I make the update to support the next xbmc version and make it so there can be an option to turn my mod on and off from the settings could it just be added to the official build? I ask this mainly b/c I do not want to keep worrying about needing to make major updates to it every time there is a change in the base script. This would also make it more accessible to users.
find quote