Visibility for Label

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
henrava Offline
Senior Member
Posts: 133
Joined: Apr 2011
Reputation: 1
Location: Italy
Post: #1
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 ?
find quote
Hitcher Online
Skilled Skinner
Posts: 11,060
Joined: Aug 2007
Reputation: 103
Location: Eastleigh, UK
Post: #2
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
(This post was last modified: 2012-04-04 22:44 by Hitcher.)
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #3
Also a lot of addons set the container content to movies wrongly so they can show some plot info
find quote
henrava Offline
Senior Member
Posts: 133
Joined: Apr 2011
Reputation: 1
Location: Italy
Post: #4
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>
(This post was last modified: 2012-04-05 00:45 by henrava.)
find quote