Kodi Community Forum
Visibility for Label - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Visibility for Label (/showthread.php?tid=127771)



Visibility for Label - henrava - 2012-04-04

Hello to all. I have a problem with a label that i don't want to show if the item is a file or addon, but show when is a movie or tvshow.
My code for the control:
Code:
<control type="label">
<description>list item label 2</description>
<font>cabin_30</font>
<textcolor>Color2</textcolor>
<label>$INFO[ListItem.Label2]</label>
<visible>[[Container.Content(movies) | Container.Content(episodes)] + !Container.Content(files)]+ !SubString(Container.FolderPath,plugin://)</visible>
</control>

But in the file view of Videos i see the label. Where is my error ?


RE: Visibility for Label - Hitcher - 2012-04-04

If a video file has been scanned to the library then it'll be classed as a movie or episode even in File view so you'll need to narrow it down more.

Code:
<visible>[Container.Content(movies) + [SubString(Container.FolderPath,videodb://1/) | SubString(Container.FolderPath,videodb://4/)]] | [Container.Content(episodes) + [SubString(Container.FolderPath,videodb://2/) | SubString(Container.FolderPath,videodb://5/)]]</visible>

List of available menus for the libraries -

http://wiki.xbmc.org/?title=Opening_Windows_and_Dialogs


RE: Visibility for Label - Jezz_X - 2012-04-04

Also a lot of addons set the container content to movies wrongly so they can show some plot info


RE: Visibility for Label - henrava - 2012-04-05

Hitcher, the folder with the items is "marked" as movie folder, but the content is not scanned. Is ok for me to have the label when the item is a scanned movie. Can you explain more the example you wrote, i don't understand fully.

Jezz, the addon part is filtered well with !SubString(Container.FolderPath,plugin:// i think.

EDIT

I found the solution with this:
Code:
<visible>[[Container.Content(movies) | Container.Content(episodes)] + SubString(Container.FolderPath,videodb://] + !SubString(Container.FolderPath,plugin://)</visible>