Kodi Community Forum

Full Version: Jarvis RC3: Container.Content() doesn't work when applied as a condition to includes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The following does not work at all in an include using parameters:

Code:
<include name=" ... " condition="Container.Content( ... )">
    <param name=" ... " value=" ... " />
</include>

Whereas the following does work:

Code:
<include condition="Container.Content( .. )"> ... </include>

Other conditions seem to work OK on includes using parameters:

Code:
<include name=" ... " condition="Skin.HasSetting( ... )">
    <param name=" ... " value=" ... " />
</include>

Code:
<include name=" ... " condition="SubString( ... , ... )">
    <param name=" ... " value=" ... " />
</include>

Does anyone have any thoughts?
And they worked in Isengard?
(2016-02-09, 09:10)Hitcher Wrote: [ -> ]And they worked in Isengard?

I don't know. Actually I guess not as I believe that Container.Content() as a boolean condition was introduced in Jarvis?

I have tried the following, which also doesn't work:

Code:
<include name=" ... " condition="SubString(Container.Content, ... )">
    <param name=" ... " value=" ... " />
</include>
For now, rather than using, for example:

Code:
<include name=" ... " condition="Container.Content(movies)">
     <param name=" ... " value=" ... " />
</include>

I am using:

Code:
<include name=" ... " condition="SubString(Container.FolderPath,movies)">
     <param name=" ... " value=" ... " />
</include>

I imagine that these in most, if not all cases, are interchangeable.
I have just seen this: http://forum.kodi.tv/showthread.php?tid=259305 which may be the culprit.
(i.e. commented out lines <!-- --> could be breaking the include)
I will check later today.
(2016-02-09, 10:39)dnairb Wrote: [ -> ]I have just seen this: http://forum.kodi.tv/showthread.php?tid=259305 which may be the culprit.
(i.e. commented out lines <!-- --> could be breaking the include)
I will check later today.

I can confirm that removing all xml comments (<!-- ... -->) from both the include and the control containing a call to the include does not fix this issue.

So it seems that the implementation of the Container.Content() boolean condition is broken.
You can't use Container.Content for an include because the content will only be known after the xml file is loaded, especially with plugins.
(2016-02-09, 23:21)marcelveldt Wrote: [ -> ]You can't use Container.Content for an include because the content will only be known after the xml file is loaded, especially with plugins.

Hmm. If so, why does "Container.Folderpath, ..." work? (post #4 above)

My include is invoked within a page, rather than to load a page.
I guess because the path needs to be know to open the window whereas the content isn't know until the path is loaded.
(2016-02-09, 23:21)marcelveldt Wrote: [ -> ]You can't use Container.Content for an include because the content will only be known after the xml file is loaded, especially with plugins.

(2016-02-10, 00:07)dnairb Wrote: [ -> ]Hmm. If so, why does "Container.Folderpath, ..." work? (post #4 above)

My include is invoked within a page, rather than to load a page.

(2016-02-10, 00:47)Hitcher Wrote: [ -> ]I guess because the path needs to be know to open the window whereas the content isn't know until the path is loaded.

Hmm. OK, I guess.

My includes now do what I intended, using "Container.Folderpath, ..." Thank you for listening...