Theme change on-the-fly (variables based on date and time of the day, weather, etc.)?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
radio Offline
Junior Member
Posts: 36
Joined: Jul 2007
Reputation: -10
Post: #31
spiff Wrote:would you prefer me writing just a simple 'no' with no explanation? i can do that.

no

I'm not one to dictate what anyone says, but I'd prefer something along the lines of what I wrote in my second response up there, a bit of civility is all.

Anyway, this has nothing to do with the thread anymore and my original

spiff Wrote:For arguments sake

seems to have run it's course. So lets stop, I'm sure you'll agree that's a good idea Wink
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,230
Joined: Oct 2003
Reputation: 177
Post: #32
What I think is really needed here is what the conditionals you want are exactly. Saying you want variables for time and date is kinda meaningless. You need to specify how you want those variables to be used.

Example: For changing images as per time of day, or date:

Time.LessThan(10:45)
Date.LessThan(MM-DD)

If you want something more general, then perhaps:

LessThan(Time,10:45)

or something similar might be more appropriate, a little more open-ended for additions at a later date. This is the sort of thing we as developers can work with.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
(This post was last modified: 2007-09-20 00:15 by jmarshall.)
find quote
timdog82001 Offline
Posting Freak
Posts: 1,142
Joined: Mar 2006
Reputation: 0
Post: #33
I believe a boolean to allow conditionals based on system time could be very useful, and add some interesting new options to skinners. I have no knowledge of how much work would be required to add this to the skinning engine, but I believe the execution for the skinner would be very simple, as stated in the title of the thread.

An example would be <visible>System.HasTime(07:30,19:15)</visible>.

In this particular example, if the time were between 7:30 and 19:15, the condition would come back as TRUE.

Another possibility would be System.HasTime(07:30:00,19:15:00), or System.HasTime(hh:mmConfuseds,hh:mmConfuseds), which would allow the skinner to specify seconds as well.

This could be useful if the skinner would like a particular action to be performed on every hour for example, or even for previously requested dynamic skins that change appearances based on the time of day. During the day a skin could have one appearance, and then at night it could bring on a more somber appearance, with darker tones and night related imagery.



EDIT: Talking to Jezz_X, it was suggested that perhaps System.IsTime would be more appropriate. In this case, if you used only one variable, it would be exact, such as System.IsTime(12:45) and you could trigger an exact event. If you used two variables, as in my original examples, it would be for something continuous anywhere between those two times.
(This post was last modified: 2007-12-19 09:01 by timdog82001.)
find quote
timdog82001 Offline
Posting Freak
Posts: 1,142
Joined: Mar 2006
Reputation: 0
Post: #34
I see somebody moved my feature suggestion in here. I guess that makes sense.

I just figured since many people requested these too, I might suggest the possibility of also doing the weather and date in the same format?

System.HasDate(startdate,enddate) and Weather.HasCondition(condition) or maybe System.HasWeather(condition)

Hopefully somebody is willing to take the time implement some of this Smile
find quote
agathorn Offline
Team-XBMC Developer
Posts: 497
Joined: Nov 2007
Reputation: 2
Post: #35
SVN Rev 12583:
added: System.Time(startTime, endTime) InfoBoolean
endTime is optional. Returns true if current system time is equal to or greater than startTime and less than endTime (if supplied). Time must be specified in the format HH:mm, using a 24 hour clock.

SVN Rev 12586:added: System.Date(startDate,endDate) InfoBoolean. fixed: System.Time() should work properly now for times that wrap around a day. Optimized System.Time() to be more efficient.
System.Date(starDate,endDate) endDate is optional. Date should be specified in MM-DD format. Returns true if currentDate is greater than or equal to startDate and less than endDate is specified.

Got Fusion?, a media-centric skin for XBMC.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Rand Al Thor Offline
Collect3 Project Manager
Posts: 916
Joined: Jul 2005
Post: #36
Awesome agathorn! I already have a few ideas of how to incorporate this!
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Thumbs Up  Thanks agathorn, great work!
Post: #37
@agathorn, is it possble to add a similar skinning feature that ties into the weather?

Gamester17 Wrote:it be cool to have it based on the time-of-day, (or way cool; the weather), so it gets lighter color themes during the day and darker color skin during the evening and even darker during the night, (if it could be tied into the weather it should automaticly change to a lighter skin if it is sunny outside and a darker one if it is raining, and could have like a white theme if it was snowing, all to 'set the mood' based on the weather)

PS! Anyone who does not grasp what this will do for XBMC skinning should checkout this wikipedia article on XMB (the Sony PlayStation 3 dashboard) which has a similar concept of skinning theme colors that change based of the time-of-day AND month-of-the-year:
http://en.wikipedia.org/wiki/Cross_Media...or_schemes

Cool
(This post was last modified: 2008-04-10 23:34 by Gamester17.)
find quote
agathorn Offline
Team-XBMC Developer
Posts: 497
Joined: Nov 2007
Reputation: 2
Post: #38
Weather is a bit more complicated really. First off there are tons of weather conditions that can be returned. I don't even know hot to find a list, but i'm sure its a lot. Secondly, there is no concept of "between this condition and that", and thirdly the skin would have to accommodate that huge list of conditions.

Unless i'm not seeing things right Smile

Got Fusion?, a media-centric skin for XBMC.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Post: #39
Since practically all skins use the same weather images (to represent the current weather) could you just not set a condition that let the skin know which is the current weather image used?, and apply a set value to each of those images?

if you look under "\XBMC\media\" you will find all the weather images in "weather.rar" (there are currently 48 types of weather representive images in there, plus one additional for 'Not-Available').

PS! Look at a skin which has the current weather displayed in the home screen when available.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
(This post was last modified: 2008-04-11 00:21 by Gamester17.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,230
Joined: Oct 2003
Reputation: 177
Post: #40
IMO this would be useless, as 48 conditions is way too many for a skinner to be bothered with. It would have to be reduced significantly (eg down to just a handful of options) before it became useful, and even then I'm not sure I see any skinners bothering with it.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Lightbulb   
Post: #41
jmarshall Wrote:IMO this would be useless, as 48 conditions is way too many for a skinner to be bothered with. It would have to be reduced significantly (eg down to just a handful of options) before it became useful, and even then I'm not sure I see any skinners bothering with it.
Those 48 conditions could simple be made to represent the brightness value of whichever theme color is used (so they do not each have to represent a color, 'just' the brightness level). Like how the brightness changes during the day in the Sony PlayeStation 3 XMB dashboard, see; http://en.wikipedia.org/wiki/Cross_Media...or_schemes

So the skinning could choose to chance the brightness level on the weather instead of the time of day Nod
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Lightbulb   
Post: #42
Gamester17 Wrote:Those 48 conditions could simple be made to represent the brightness value of whichever theme color is used (so they do not each have to represent a color, 'just' the brightness level). Like how the brightness changes during the day in the Sony PlayeStation 3 XMB dashboard, see; http://en.wikipedia.org/wiki/Cross_Media...or_schemes

So the skinning could choose to chance the brightness level on the weather instead of the time of day Nod
How about assigning a fade/brightness-level procentage to each image (based on the weather condition that each image represent, so low fade/brightness-level procentage for sunny and high fade/brightness-level procentage for rain, etc. ...or vice versa, that could be up to be skinner if 'good' weather should have low fade/brightness-level procentage and 'bad' weather should have fade/brightness-level procentage or vice versa).

Cool

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Post: #43
Have anyone given this any more thought? Confused

I still think that automaticly on-the-fly change theme based on time-of-day and/or the weather would be really cool skinning feature.

Cool

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #44
There is allready time and date based conditions added so things can be shown at certain times /days
Its in the wiki under boolean conditions
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Post: #45
Cool! ...so only 'current weather' as boolean conditions missing now then? Wink

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote