Kodi Community Forum

Full Version: Different FileBrowser layout depending on content
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm wondering if its possible to have different layouts for FileBrowser.XML subject to the content your browsing. In other words, when browsing for subtitles the user gets a text list, if browsing for thumbs or fanart you get a panel of images.

I've tried conditional visibility, but because both controls have the same id "450" it appears to cause problems even if I hide one of them. Can anyone please help.

Thanks
That's how it already works - list 450 is non-thumb and list 451 is for thumbs.
And xbmc decides if its thumbs or not (and which container to display) by what percent of the files are thumbable media
Great thanks guys. I tried using 451 but only on the list. It hadn't occurred to me that it needed to be the thumbs that were 451. All working great now and thanks again for your help. It's very much appreciated.
Okay another question which hopefully isn't as obvious as the last. Is it possible to affect which controls are visible based on the previous control? What I'm after is a way to determine whether the FileBrowser will be displaying posters or Fanart? I have two buttons on the VideoInformation window one to change the poster, the other to change the Fanart. I'd like to be able to display different UI's depending on which button the user selected.

I see that there are boolean conditions for Window.Next(window) / Window.Previous(window) and I was wondering whether there was something like Control.Next(control) / Control.Previous(control)? If not is there a way to achieve what I'm after using what’s currently available?
What about banners vs posters? Seems easier to go with generic layout.
Check out reFocus. You can determine posters or fanarts by string comparing the dialog title.
Actually I'm not using that bit anymore, but yeah you can do a stringcompare on the path label or dialog title. Unfortunately there's no way to distinguish posters from banners.
You could set a property when clicking an image (poster/banner/fanart) button and then use a conditional include for the list based on property.
Great thanks guys. Hitcher could you please give me an example as I'm not too sure what you mean? Also final question (I hope). Is it possible to bring up the change poster/fan art from a dialog or do the buttons have to live on the VideoInfo window? What I'd like is to being up a dialog with options to play, change poster, change fan ar but I'm not sure that this is possible because how do I assign the button ID's?
CloudDweller Wrote:Is it possible to bring up the change poster/fan art from a dialog or do the buttons have to live on the VideoInfo window? What I'd like is to being up a dialog with options to play, change poster, change fan ar but I'm not sure that this is possible because how do I assign the button ID's?

Code:
<onclick>SendClick(2003,[i]n[/i])</onclick>

would probably work, where n is the button's ID
Great thanks Jeroen I'll give this a try over the weekend. Love reFocus by the way, truely one of the best skins available for XBMC.
Hitcher Wrote:You could set a property when clicking an image (poster/banner/fanart) button and then use a conditional include for the list based on property.

Okay I've set the property as follows

Posters
<onclick>SetProperty(VideoInfo,1[,2003])</onclick>

Fan Art
<onclick>SetProperty(VideoInfo,2[,2003])</onclick>

Episode Thumbs
<onclick>SetProperty(VideoInfo,2[,2003])</onclick>

But I'm not sure what exactly I need to type to read the property and display the correct label. This is what I've got so far but its not working.

<visible>Window.IsVisible(2003) + StringCompare(Window(2003).Property(VideoInfo.1),true)</visible>
remove the square brackets, eg:
Code:
<onclick>SetProperty(VideoInfo,1,2003)</onclick>
and use a stringcomare to check the windowproperty:
Code:
<visible>StringCompare(Window.Property(VideoInfo),1)</visible>
Thanks Ronie but that didn't work. I tried <visible>StringCompare(Window(2003).Property(VideoInfo),1)</visible> but that also didn't work.
Pages: 1 2