vdb86 / screensaver.digitalclock

Digital clock screensaver for Kodi
https://forum.kodi.tv/showthread.php?tid=237338
GNU General Public License v2.0
10 stars 10 forks source link

request #2

Closed mgonzales71 closed 9 years ago

mgonzales71 commented 9 years ago

not a must or even of any priority but could you .. well let me explain... :smile:

skin.titan - works... skin.titan.* - fails :cry: LOL more specifically skin.titan.beta fails... now I can copy/create a script-Digital Clock Screensaver-skin.titan.beta.xml with every update but figured other skin devs may enjoy your screensaver (as I do! thanks btw) :smile:

also - if you are bored (hehe) maybe have your script look for a script-Digital Clock Screensaver-skin.custom.xml file and if it exists use it so skin devs can customize support for this screensaver as well. sort of an override of the built-in support.

keep up the awesome work!

Thanks,

Mario

vdb86 commented 9 years ago

Hi Mario, glad you like it! I made it that way since every skin requires it's own xml file (because of the fonts used). I wanted to make it so that users can choose font for everything but later I found out that add-ons can't define their own fonts, but have to use what's defined with the skin. I'll take a look at making it so that devs can use skin.custom.xml, that sounds like a really good idea.

Thank you! Vojislav

mgonzales71 commented 9 years ago

You're welcome!

I think every skin should support all the font "names" of the "default" fontset in confluence...

but I admire your care to work around all the current skins. :+1:

as a suggestion - if you don't find a skin match to your included xml files - use a "default.xml" that uses the default names from confluence and maybe display "unknown skin detected - using default font name (see ReadMe.md)" for a few seconds on initial screen saver activation.

also - regarding your weather display option... kodi comes with a built-in weather icon set so you could display the image defined by Current.ConditionIcon in Window(Weather).Property(key)

just make sure to check if weather is fetched / enabled - I find it curious kodi has a default weather icon set yet does not enable a default weather addon :)

just in case you don't have the link handy - http://kodi.wiki/view/Skinning_Manual#Weather_labels

again thanks for any and all considerations!

Mario

vdb86 commented 9 years ago

Hi Mario, all done with default and custom xml files.

I'm looking into the weather icons and I'm stuck a bit. Since Window(Weather).Property(Current.ConditionIcon) is used as a infolabel with $INFO[infolabel] or with xbmc.getInfoLabel(infolabel) I guess I shoud use it with control type="image" in xml file?

vdb86 commented 9 years ago

Alright taken care of that too, got it to work. Do you know what defines weather icon sets, skins?

mgonzales71 commented 9 years ago

the default weather icons come with the Kodi app itself - look in the Kodi profile's cache folder/dir...

here is the windows example...

2015-10-07_05-47-20

to override this in a skin this is how we did it in Titan for example...

users are able to cycle/toggle thru 5 sets of weather icons the skin provides.

$INFO[skin.string(WeatherIconPack)] is then set to "set1" or "set2" etc.

so if the current weather fanart code is returned as 3 from the weather addon the skin will display the png file: C:\Users\Mario\AppData\Roaming\Kodi\addons\skin.titan.beta\extras\weathericons\set5\3.png

special://skin/ expands to the location of the skin addon itself then you just point the rest to the images.

grab a copy of titan beta (or browse the code on GIT) and look in extras/weathericons

git repo: https://github.com/marcelveldt/skin.titan/ zip of master: https://github.com/marcelveldt/skin.titan/archive/master.zip

you know you could include your own icon set or sets with your addon and override the kodi default (they are blah I know right hehe).

I personally like set4 and set5 in Titan Beta

example of titan skin code for current weather icon (btw 256x256 is usually a good size to use)

        <!--Current Weather-->
        <control type="image">
            <!--Current Weather Icon-->
            <texture>special://skin/extras/weathericons/$INFO[skin.string(WeatherIconPack)]/$INFO[Window(Weather).Property(Current.FanartCode)].png</texture>
            <width>256</width>
            <height>256</height>
            <aspectratio align="left" aligny="bottom">keep</aspectratio>
        </control>

hope this helps! I will test out your new code now

thanks!

mario

mgonzales71 commented 9 years ago

well I will test it once you commit the changes to git hehehe (thought you had done that - oops!)

vdb86 commented 9 years ago

Awesome, I'll take a look at this when I get a bit more time, looks promising! I still haven't committed anything, will let you know when I do!

mgonzales71 commented 9 years ago

sounds good! - be glad to test when you do.

look in 1080i/IncludesWeather.xml of the skin files for code examples (every skin does weather differently some offer minimal other give you it all)

confluence skin is a baseline (no customization, etc) source for weather skin code examples to build upon as well...

https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/MyWeather.xml https://github.com/xbmc/xbmc/blob/master/addons/skin.confluence/720p/ViewsWeather.xml

Have a great day (or night)!

Mario

vdb86 commented 9 years ago

I'm all done, just a bit more testing and I'll commit it! Quick question, would you guys mind if I used your weather icons?

mgonzales71 commented 9 years ago

we made every effort to find icons that were free to use... for instance the color icons fall under http://creativecommons.org/licenses/by-nc-sa/3.0/ - you will see a text file in that directory because of the attribution part but - that's not so hard to do :-)

Ronie is working on this for script for Javis.... https://github.com/ronie/script.image.resource.select you could probably utilize this if you wanted at some point,

see his post with info and a few pretty pictures here: http://forum.kodi.tv/showthread.php?tid=239558

check out the image resources for Javis from the official repo that has already been uploaded.. http://mirrors.kodi.tv/addons/jarvis/

for instance.... ./resource.images.weathericons.3d-coloured/

the images are in xbt files.. (Texture Packed files) - if you have never worked with them - save yourself some grief and go here: http://forum.kodi.tv/showthread.php?tid=201883

this windows tool will create and extract images from an xbt file - the tool is very cranky so take care to read the forum.

skin devs usually keep the raw images on git and then run a script to compile / build the xbt with each release.

if you want to know the wonders of the raw orig command line tool - http://kodi.wiki/view/TexturePacker

Hope this help

Looking forward to seeing / testing your updates when they are ready!

Mario

vdb86 commented 9 years ago

This script looks pretty good, at this point it's still a bit advanced for me, but thanks for pointing it out! Thanks for all the info Mario!

mgonzales71 commented 9 years ago

you're welcome! and I understand about things being advanced - when I first offered Marcel to help with Titan I had never done anything but use a skin - but I loved his skin and wanted to do what I could to give back... now I feel I know alot more and have been able to give back which makes me feel good (its free/open source so it has to be a labor of love/hobby etc) but Marcel - he is the Master coder... python and skinning, json, etc - just amazing skills!

I love that he takes input from and lets others be a part of it. I keep telling him - that in the end it's his baby so he gets final say (as he should) but I fear he may accept things he doesn't like to make others happy. anyway - too many cooks spoils the dish.. ya know! plus could you imagine if you added everything everyone wanted? it would never work right or look good anyway!! haha

keep up the awesome work Vojislav and have a good day or night hehe!

Mario

vdb86 commented 9 years ago

All done, I tested it thoroughly so it should work just fine. Hope you like it! Let me know if you need anything else or something is not working as expected :)

mgonzales71 commented 9 years ago

going to go grab it now :)

mgonzales71 commented 9 years ago

works great - tested in skin.titan.beta so I am going to guess the default.xml kicked in hehe

oh - a thought - for the text elements - maybe a shadow color settings option?

really would only need white, black, grey or none as options - don't think you need to have a shadow option for every text element (hour, colon, minutes, etc) - one setting for all text be easiest to do.

awesome work!

any future plans for other options?

I love simple, small, elegant - I have found in the past that screen savers can lead to situations where kodi would slip into screensaver mode and the script would get locked in a loop and force a kill/restart of kodi/xbmc - so a request to you is you would keep a "lite" version available too when you decide to add RSS news and image feeds etc! hahaha - thanks again! I offer to test and help any way I can in the future! - Mario

mgonzales71 commented 9 years ago

https://mega.nz/#!lkIDAIzR!3UEsA1f9m3LwSj7851mSfwDWKvwfcwLH_KuxMpVJ03o https://mega.nz/#!I8RBFDLT!H0a-pGc_A3Ps4XmEacQYmmIKuG5adyGcv_PGNov00ho

a couple more icon sets zip files the color one is an "amazon" weather set - pretty basic they only had a small set of icons to work with (luckily several can represent multiple conditions).

vdb86 commented 9 years ago

I was thinking about shadow color, but wanted to keep it simple, just text on black background. Later I added slideshow for people that would use it (I never use it).

I'll never add RSS news and image feeds, this is more/less what I intended it to be. I've seen screensavers get locked too, I definitely want to avoid that.

Thanks for the icon sets I'll take a look!

mgonzales71 commented 9 years ago

oh I was joking about the rss feeds hehe :) but I actually use the slide show feature - I point it to a folder of about 400 nice quality images I use for whenever I want a nice image... serves as random screen savers, desktop and lock screen images very nicely *(I got tired of just black LOL)

this may help illustrate why a shadow option setting of simply none/black/gray/white for all text is worth considering...

2015-10-08_13-08-20 2015-10-08_13-09-34

hey I even whipped up a custom_text.xml skin file so it's Kodi authentic rendering! :smile:

Mario

vdb86 commented 9 years ago

Since you made these examples I'll definitely look into a shadow option :D

mgonzales71 commented 9 years ago

Haha - well trust that I will survive either way

But just think of it as balancing out the text with the weather icons that have a shadow already :-)

Mario

mgonzales71 commented 9 years ago

edited default xml to see what adding shadowcolor black would look like on a couple images...
now it's my favorite screen saver for Kodi LOL :-)

2015-10-08_20-22-47 2015-10-08_20-24-16

vdb86 commented 9 years ago

Added this option too, now just to test it a bit and all done!

vdb86 commented 9 years ago

Committed! Hope you like it. Let me know if you need anything else!

mgonzales71 commented 9 years ago

as expected awesome work once again! thank you! :tada:

I only could come up with 2 final suggestions :disappointed: (resist the feature creep! hehe)

first for the display of the background images I suggest:

    <control type="image" id="30020">
        <description>Background</description>
        <posx>-10</posx>
        <posy>-10</posy>
        <width>1290</width>
        <height>730</height>
        <fadetime>500</fadetime>
        <aspectratio>scale</aspectratio>
    </control>

in skins I like to overlap a little .... at least 5 both x and y on textures be it a border or crop, etc - nothing good is ever at the edge of a pic anyway!! right?

the second is suggestion is just thinking of something to ... suggest ;)

maybe look for a custom-user.xml in \userdata\addon_data\screensaver.digitalclock\ in case someone wanted to make it even more personal.

really just the scaling of the background is the one I would vote for but I had to think of one more :)

again great work!!

Thanks

Mario

vdb86 commented 9 years ago

Thanks again Mario, for all your suggestions and help!

mgonzales71 commented 9 years ago

hey wanted to give a heads up... typically custom skin override files are named (as an example): script-nextup-notification-NextUpInfo.xml

so you should probably follow convention and look for files named script-screensaver-digitalclock.xml as your custom skin xml file.

if you like...

try out a slight mod of skin.defualt.xml I am using (gives a nod to running skin and scales images to avoid black bars on sides of displayed images) - eventually with a few more changes to become an override in the skin to support your screen saver! :)

http://pastebin.com/4zSg6VYa

2015-10-11_11-47-54

love the screen saver - thanks again!

mario

vdb86 commented 9 years ago

I've checked it out, nice idea, but generally I try to avoid any static images or text do to the burn in effect. But thanks for your effort, you definitely have interesting stuff on your mind, and I'll gladly take a look at your ideas when you get them.

mgonzales71 commented 9 years ago

sorry to bug you again hehe -

you bring up a good point... although screen image burn-in is rare now right? - idk maybe old tv and old plasmas?

well anyway - quick fix below :-)

have a good rest of your weekend!

Mario

    <control type="image">
        <description>Skin Logo</description>
        <posx>0</posx>
        <posy>-8</posy>
        <width>128</width>
        <height>128</height>
        <fadetime>500</fadetime>
        <texture>special://skin/icon.png</texture>
        <animation effect="fade" start="100" end="70" time="150" condition="true">Conditional</animation>
        <aspectratio>keep</aspectratio>
        <visible>!IntegerGreaterThan(System.Time(ss),15)</visible>
    </control>

    <control type="image">
        <description>Skin Logo</description>
        <posx>1152</posx>
        <posy>600</posy>
        <width>128</width>
        <height>128</height>
        <fadetime>500</fadetime>
        <texture>special://skin/icon.png</texture>
        <animation effect="fade" start="100" end="70" time="150" condition="true">Conditional</animation>
        <aspectratio>keep</aspectratio>
        <visible>IntegerGreaterThan(System.Time(ss),15) + !IntegerGreaterThan(System.Time(ss),30)</visible>
    </control>

    <control type="image">
        <description>Skin Logo</description>
        <posx>0</posx>
        <posy>600</posy>
        <width>128</width>
        <height>128</height>
        <fadetime>500</fadetime>
        <texture>special://skin/icon.png</texture>
        <animation effect="fade" start="100" end="70" time="150" condition="true">Conditional</animation>
        <aspectratio>keep</aspectratio>
        <visible>IntegerGreaterThan(System.Time(ss),30) + !IntegerGreaterThan(System.Time(ss),45)</visible>
    </control>

    <control type="image">
        <description>Skin Logo</description>
        <posx>1152</posx>
        <posy>-8</posy>
        <width>128</width>
        <height>128</height>
        <fadetime>500</fadetime>
        <texture>special://skin/icon.png</texture>
        <animation effect="fade" start="100" end="70" time="150" condition="true">Conditional</animation>
        <aspectratio>keep</aspectratio>
        <visible>IntegerGreaterThan(System.Time(ss),45)</visible>
    </control> 
vdb86 commented 9 years ago

Burn in is as present as before, it just takes longer to happen. I didn't know you can use this much stuff inside the argument, good to know. I'll play around with this, will see if I implement it. Thank you!

mgonzales71 commented 9 years ago

Oh yea you should take a look at the skinning documents on Kodi.tv and by far the best place to learn is with an existing skin. I am always playing around with different things just to learn / understand how various things work.

Some things aren't even documented - it's not until I see it in use in a skin that I discover something new.

Have fun playing around - feel free to share anything cool :-)

By the way you have any favorite font you've used with your screensaver (for the time especially)?

Take care!

Mario

Sent from my iPhone

On Oct 12, 2015, at 12:46 AM, vdb86 notifications@github.com wrote:

Burn in is as present as before, it just takes longer to happen. I didn't know you can use this much stuff inside the argument, good to know. I'll play around with this, will see if I implement it. Thank you!

— Reply to this email directly or view it on GitHub.

vdb86 commented 9 years ago

Will do! :) I really haven't payed attention that much since I figured out I can't define my own fonts, in the end I just tried to make it work with most skins (some I had to change or contact the developer so he would change them). Hopefully at some point I'll be able to define and use my own font and that will make everything so much easier.