Suggestion: Themes based on calendar date
#16
ronie Wrote:yes, you can use
<include condition="foo">Custom.xml</include>

i did a quick test and it turns out this is not possible.


HappyGoLucky Wrote:Can you gracefully trap if an include file does not exist? That is, attempt to include one, and if it fails, include a different (default) one? I'm thinking not. Sad

nope, that's also not possible.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#17
ronie Wrote:i did a quick test and it turns out this is not possible.

nope, that's also not possible.

Hmmm... Rolleyes Thanks for checking Ronie!!

OK, how about if there is a single file which is static and the user is required to edit it. In this file, there would always exist 366 entries -- one for each day of the year. Each entry, based on the current month and day, would set the same variable. That variable would contain the path for the themed images.

eg.

DayOffset = [calculation];

...
if DayOffset = 358 then ThemedPath = "\Default\";
if DayOffset = 359 then ThemedPath = "\Christmas\";
if DayOffset = 360 then ThemedPath = "\Christmas\";
if DayOffset = 361 then ThemedPath = "\Christmas\";
if DayOffset = 362 then ThemedPath = "\Christmas\";
if DayOffset = 363 then ThemedPath = "\Christmas\";
if DayOffset = 364 then ThemedPath = "\Christmas\";
if DayOffset = 365 then ThemedPath = "\NewYears\";
if DayOffset = 366 then ThemedPath = "\NewYears\";
if DayOffset = 001 then ThemedPath = "\NewYears\";
if DayOffset = 002 then ThemedPath = "\Default\";
...

Something like that, which is "constantly" evaluated on page load. ThemedPath would then be concatenated with other strings to make the full path.
Reply
#18
maybe it would make more sense to put this functionality in a script or plugin?
i've no knowledge of python coding, but i'm afraid what your trying to accomplish is way to advanced for a skin. skins are rather dumb... ;-)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#19
I don't want to be a party pooper but I just thought of a problem and an alternative.

Easter is not the same date every year but if a birthday falls in or around Easter, which theme would you show, Easter or Birthday.

Instead of duplicating all the backgrounds etc, why not just add a.png to the home screen. You could have a user definable path with the files named MMDD and just compare the system date and the existence of a PNG file with that date. It would not however solve the Easter problem.

Interesting idea though.

MacMini 2.3gHz i7, OS X 10.13.6
Running Kodi 18.9
Reply
#20
jpf55 Wrote:I don't want to be a party pooper but I just thought of a problem and an alternative.

Easter is not the same date every year but if a birthday falls in or around Easter, which theme would you show, Easter or Birthday.

Instead of duplicating all the backgrounds etc, why not just add a.png to the home screen. You could have a user definable path with the files named MMDD and just compare the system date and the existence of a PNG file with that date. It would not however solve the Easter problem.

Interesting idea though.

The idea outlined in post 17 would take care of the problem since there is a one-to-one correlation with date and event, as set by the user.

Anyone else think only scripting would help Ronie out?
Reply
#21
Everyone agree that scripting might be the only way to go here? If so, I can help write the script. Give me the fields, and I'll write the code and logic! Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
Suggestion: Themes based on calendar date0