Project

General

Profile

Actions

Feature #288

closed

new attribute for <include condition=''foo">

Added by byron about 10 years ago. Updated about 10 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
User Interface
Target version:
-
Start date:
11/02/2014
Due date:
% Done:

0%

Resolution:
wontfix

Description

I was always under the impression that if a skinner coded

<include condition="foo" file="bar">Blur-Ba-Dee-Blurb</include>

then xbmc would just look past the condition (and the Includes_bar.xml) until the condition was met, but clearly this is not the case.

http://www.xbmc4xbox.org.uk/forum/viewtopic.php?f=15&t=2318#p18913

I'm not sure if this is something that anyone who knows the source code is willing to implement, I think this idea is fantastic in theory, but I have no idea how to write the code (what files to change etc). So I was thinking if the code was easy enough, a new attribute could be added specifically for conditional includes -- I'll refer to it as "wait" for this request -- in which if set to "true" xbmc passes right over the entire include (especially the file that's holding all of the code to be included) if the conditions equal false. Think of how many users never use all of the options that a skin has to offer, yet at the same time they are all included into memory either way and it's a total waste of ram at that point.

If a file isn't included in includes.xml to begin with (a workaround that I've exploited in clarity), but want's to be included somewhere else in another skin.xml then a skinner only needs to add the [file=""] attribute to connect the dots (this approach saves a good deal of ram). Problem becomes that at window render when said skin.xml is activated [file="bar"] is included into memory...if this

<include condition="foo" file="bar" wait="true">

could work the way I'm thinking, then the condition (and huge chunks of code) could be completely bypassed until conditions are met and much ram could be saved for sure.

Actions

Also available in: Atom PDF