Kodi Community Forum

Full Version: Controlling available Views
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi
Playing around with creating my own views and having some success.

Figured out how to add them to the MyVideoNav.xml and I put the newly created view in <views></views> so that it shows up in the slide out, and I can select the new view.

Been looking about at other skins and the wiki but couldn't find what I'm looking for, probably missed it.

How do I control the available views when in a given screen, by control I mean when I click TV Shows and it opens my initial layout then select a show it goes to the season list, it it possible to limit the choices available on the season list i.e. list and wide list only.

After selecting a season I would like to limit the view choices available on the episode list also.

I'm hoping once I have this knowledge in my head I'll then be able to figure out how to get certain icons to show up on certain screens, ie on the episode list have a small icon show up beside an episode name but not show up on the season list names.
<visible>Container.Content(Movies) | Container.Content(TVShows) | Container.Content(Seasons)</visible>

ect. Either on the controls (different lists in a viewtype) or by putting the includes in MyVideoNav in groups.
Wow thanks how did I miss that thank you.

Found the List of Boolean Conditions page on the Wiki, I thinks that page is going to become a close personal friend lol.
Along the similar lines
Currently using to show: Title (Year) - Duration
Code:
<label>$INFO[ListItem.Title] ($INFO[ListItem.Year]) - [COLOR=orange]$INFO[listitem.duration] min[/COLOR]</label>

When I go to the season window I get the season title: Season 1 as expected but I also get () - min is there any way to hide these extra bits when no year or duration exists?
PHP Code:
<label>$INFO[ListItem.Title]$INFO[ListItem.Year, (,)] - [COLOR=orange]$INFO[listitem.durationmin[/COLOR]</label
Had to alter it a little to:
Code:
<label>$INFO[ListItem.Title]$INFO[ListItem.Year, (,)] [COLOR=orange]$INFO[listitem.duration, , min][/COLOR]</label>

Cant figure out how to get the - between year and duration.

How does the above work what do the , , do?
$INFO[ListItem.Label,PREFIX,SUFFIX]
Going to sound like a right newbie now lol, but i am one Big Grin

I understand the $INFO[ListItem.Label] part but what does ,PREFIX,SUFFIX mean, want to get my head around this as I have other cases I can use it in.

Is there a wiki page?
Ah ok I get it now, wasn't aware you could so that sort of thing. Something else learnt.
Once again thanks for the help guys, learning more and more everyday thanks.
(2012-10-06, 21:18)MassIV Wrote: [ -> ]<visible>Container.Content(Movies) | Container.Content(TVShows) | Container.Content(Seasons)</visible>

ect. Either on the controls (different lists in a viewtype) or by putting the includes in MyVideoNav in groups.

I figured out to hide and show bits from certain views with Container.Content(TVShows) and !Container.Content(TVShows)

But how do I make my new poster view not appear / unavailable on the side menu when in the season and episode screens. All I want is my List and wide list views available in them screens.

I tried adding to MyVideoNav.xml

Code:
<control type="group">
            <visible>Container.Content(tvshows) | Container.Content(movies)</visible>
            <include>PosterInfo</include> <!-- view id = 502 -->
</control>

This dose stop the layout from appearing when selected but it doesn't hide the option / name of the layout from appearing in the slide out.

Ideally I want my new poster layout to only show up on the movies and tv shows screens only, and the file list and wide list options to only show up when on episodes and seasons list.

What am I doing wrong have I missed something fundamental in my understanding? (this is more then likely lol).

Look forward to replies
Just add an include condition without a group control.

<include condition="Container.Content(tvshows) | Container.Content(movies)">PosterInfo</include>
Ah why didn't i think of that seen it enough whilst looking through and adding code lol.

I take it this will only bring the view into the side options menu whilst on the movies and tv screens only?

If i'm on the seasons or episodes screen the view isn't in the available options.
Had a play at work whilst on lunch Smile If i put the condition mentioned into the include of MyVideoNav.xml the option for BannerView doesn't show up at all in any of the views, be it TV Shows or Movies.

What am I doing wrong as if i remove the condition from the include BannerView shows up in all screens.

MyVideoNav.xml
http://pastebin.com/vNpnfSJk

BannerView.xml
http://pastebin.com/sGKbMD1S
Pages: 1 2