• 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 15
Release script.colorbox
#76
It's probably me not thinking right, and being confused from reading threads and code, but I cant figure this script out. There are lots of onloads and settings. What settings do I really need to do what I want?

I just want something simple:
I want a colordiffuse for an image to change in a panels focusedlayout, based on another image inside the same panels focusedlayout (ListItem.Art(thumb) or ListItem.Art(fanart), depending on if it's an episode or a movie).


I gathered I need an onload in startup.xml, but which one(s)? Based on your replies, I gather 7977, or SEVEN, is what I want. So, I would guess in startup.xml I need:
PHP Code:
<onload condition="System.HasAddon(script.colorbox)">RunScript(script.colorbox,daemon=True)</onload>
<
onload>SetProperty(SEVEN_daemon_set,True,home)</onload
anything else?
Do I need the AlarmClock and various other settings?

In my Home.xml I have this:
PHP Code:
<control type="panel" id="301">
...
<
focusedlayout ...>
    <
control type="multiimage" id="7977">
        <
left>-2160</left>
        <
width>1</width>
        <
height>1</height>
        <
imagepath background="true">$INFO[ListItem.Art(thumb)]</imagepath>
    </
control>
    <
control type="image">
        <
texture>texture.png</texture>
        <
colordiffuse>$INFO[Window(home).Property(ImageColorSEVEN)]</colordiffuse>
    </
control>
</
focusedlayout>
...
</
control
I had to add the width/height to the multiimage, otherwise it would just overlay the entire screen.

This produces one color: ImageColorSeven is always FFffffff ...

I got it working once, sort of, by adding all lines I could find, producing just a mess of code. It gave me almost the desired behavior, but it didn't always choose the right color. For say 10 items, it would display a color from the image in 8 cases, but two of them would just be whatever was selected as the color from the image before... does that make sense? I tried removing lines here and there, to see which lines did what.. but I couldn't make sense of it.

If I look at skin.adonic, it seems there's no example of it using a color from an image? It uses the effects (blur, pixelation etc), but no color changing images. aPEX does, but it seems outdated based on the contents of this thread. And, like someone else said, it uses so much of colorbox it's unclear what lines you actually need to just do one thing.

Thanks for your help, and a really useful script!
Reply
#77
I Try simple test use for FIVE:
I use in musicvisualisation for colordifuse "Time",frame for album cover and name of song

Image

userdata\addon_data\script.colorbox\
text part is from colors.txt
images for this have title f5e85be8f894591c17c2a9f34da47c43
And color for this image is in colors.txt
Window(home).Property(ImageColorFIVE) ff272217
Window(home).Property(ImageCColorFIVE) FF171c27

But on kodi image is different Huh

For next changing of image all working as should....problem with color loading apeir from time to time Smile

I change "Get_Colors" from phil65 toolbox.script...and resultats are better....
See what can you doo about color.
XBoxMediaCenter (Kodi Matrix ) 19.3 , AndroidBox -Matrix Skin AeonMQ6
Reply
#78
(2017-08-19, 12:23)badaas Wrote: Thanks again @jm! Sorry for all the changes, but it gives you all much more flexibilty and less obscure option names etc. Plus stops things being hardcoded into colorbox!
No worries, sleep deprivation at work on my part lol. Your work is appreciated Smile
Reply
#79
(2017-08-20, 11:00)Angelinas Wrote: I Try simple test use for FIVE:
I use in musicvisualisation for colordifuse "Time",frame for album cover and name of song

Image

userdata\addon_data\script.colorbox\
text part is from colors.txt
images for this have title f5e85be8f894591c17c2a9f34da47c43
And color for this image is in colors.txt
Window(home).Property(ImageColorFIVE) ff272217
Window(home).Property(ImageCColorFIVE) FF171c27

But on kodi image is different Huh

For next changing of image all working as should....problem with color loading apeir from time to time Smile

I change "Get_Colors" from phil65 toolbox.script...and resultats are better....
See what can you doo about color.

Did you read this https://forum.kodi.tv/showthread.php?tid...pid2633892

Set the two colours to 'main:' 'comp:' to use as is, hopefully this is discrepancy.
Reply
#80
Yeap...read....but not working for Five..
Always is fffffff and blur doesent work
Images for FIVE is wrong mine ID for five is poster and in userdata\addon_data\script.colorbox\ images for this is fanart ?!?
I rely dont understand....I insted of
Code:
    <onload>SetProperty(FIVE_daemon_set,blur,home)</onload>
    <onload>SetProperty(cfa_daemon_set,blur,home)</onload>
set this line
Code:
<onload condition="System.HasAddon(script.colorbox)">SetProperty(FIVE_daemon_fire,"var=main,set=$INFO[Skin.String(colorbox_main)]|
var=comp,set=$INFO[Skin.String(colorbox_comp)]|var=quality,set=$INFO[Skin.String(colorbox_quality)]|
var=blursize,set=$INFO[Skin.String(colorbox_blursize)]|var=bitsize,set=$INFO[Skin.String(colorbox_bitsize)]|
var=pixelsize,set=$INFO[Skin.String(colorbox_pixelsize)]|var=black,set=$INFO[Skin.String(colorbox_black)]|
var=white,set=$INFO[Skin.String(colorbox_white)]",home)</onload>
in mine skin settings have all string for this
Code:
    <onload>Skin.SetString(colorbox_main,main:hls*0.0;0.1;0.0)</onload>
    <onload>Skin.SetString(colorbox_comp,main:hls*0.5;0.2;0.4)</onload>
    <onload>SetProperty(cfa_daemon_set,blur,home)</onload>
    <onload>Skin.SetString(colorbox_quality,8)</onload>
    <onload>Skin.SetString(colorbox_blursize,2)</onload>
    <onload>Skin.SetString(colorbox_bitsize,1)</onload>
    <onload>Skin.SetString(colorbox_pixelsize,12)</onload>
    <onload>Skin.SetString(colorbox_black,000000)</onload>
    <onload>Skin.SetString(colorbox_white,ffffff)</onload>
I try to change FIVE_daemon_fire in FIVE_daemon_set and cfa_daemon_set same resultat....None

Before changes Five was working.If I remove all new onload and write old
Code:
    <onload>SetProperty(FIVE_daemon_set,blur,home)</onload>
    <onload>SetProperty(cfa_daemon_set,blur,home)</onload>
Have blur image...but color are in mess, as I write
XBoxMediaCenter (Kodi Matrix ) 19.3 , AndroidBox -Matrix Skin AeonMQ6
Reply
#81
You set everything via NINE, and why you setting daemon_fire??

This is wrong
Code:
System.HasAddon(script.colorbox)">SetProperty(FIVE_daemon_fire,

All id's in daemon use same quality/size etc. You don't set each one separately.

Need sleep will check back tomorrow.
Reply
#82
@ filigran I'll help tomorrow now. Need zzzzzzz,
Reply
#83
@ Angelinas try:

Code:
<onload>SetProperty(FIVE_daemon_set,blur,home)</onload>
<onload>SetProperty(cfa_daemon_set,blur,home)</onload>
<onload>Skin.SetString(colorbox_main,main:hls*0;0.1;0)</onload>
<onload>Skin.SetString(colorbox_comp,main:hls*0.5;0.2;0.4)</onload>
<onload>Skin.SetString(colorbox_quality,8)</onload>
<onload>Skin.SetString(colorbox_blursize,2)</onload>
<onload>Skin.SetString(colorbox_bitsize,1)</onload>
<onload>Skin.SetString(colorbox_pixelsize,12)</onload>
<onload>Skin.SetString(colorbox_black,000000)</onload>
<onload>Skin.SetString(colorbox_white,ffffff)</onload>
<onload condition="System.HasAddon(script.colorbox)">AlarmClock(nms1,SetProperty(NINE_manual_set,"var=main,set=$INFO[Skin.String(colorbox_main)]|
var=comp,set=$INFO[Skin.String(colorbox_comp)]|var=quality,set=$INFO[Skin.String(colorbox_quality)]|
var=blursize,set=$INFO[Skin.String(colorbox_blursize)]|var=bitsize,set=$INFO[Skin.String(colorbox_bitsize)]|
var=pixelsize,set=$INFO[Skin.String(colorbox_pixelsize)]|var=black,set=$INFO[Skin.String(colorbox_black)]|
var=white,set=$INFO[Skin.String(colorbox_white)]",home),00:05,true)</onfocus>
Reply
#84
@filigran try:

Startup.xml:
Code:
<onload>SetProperty(SEVEN_daemon_set,True,home)</onload>
<onload>Skin.SetString(colorbox_main,main:)</onload>
<onload>Skin.SetString(colorbox_comp,comp:)</onload>
<onload condition="System.HasAddon(script.colorbox)">AlarmClock(nms1,SetProperty(NINE_manual_set,"var=main,set=$INFO[Skin.String(colorbox_main)]|
var=comp,set=$INFO[Skin.String(colorbox_comp)]",home),00:05,true)</onfocus>


On Home.xml somewhere:
Code:
<control type="multiimage" id="7977">
    <left>-2160</left>
    <imagepath background="true">$VAR[HomeContPic]</imagepath>
</control>

Code:
<control type="panel" id="301">
...
<focusedlayout ...>
    <control type="image">
        <texture>texture.png</texture>
        <colordiffuse>$VAR[HomeContColor]</colordiffuse>
    </control>
</focusedlayout>
...
</control>

Code:
<variable name="HomeContPic">
    <value condition="Container(301).Content(movie)">$INFO[Container(301).ListItem.Art(fanart)]</value>
    <value condition="!String.IsEmpty(Container(301).Listitem.Art(thumb))">$INFO[Container(301).ListItem.Art(thumb)]</value>
</variable>
<variable name="HomeContColor">
    <value condition="!String.IsEmpty(Window(home).Property(ImageColorSEVEN))">$INFO[Window(home).Property(ImageColorSEVEN)]</value>
</variable>

OR you can leave out the Container(301), as it will default to current focused item.
This should get you started.
Reply
#85
(2017-08-21, 17:58)badaas Wrote: @ Angelinas try:
Just try...And working like charm.....
All color are real color, evan blur image working,,,,Smile
Great work....

Image
Image
XBoxMediaCenter (Kodi Matrix ) 19.3 , AndroidBox -Matrix Skin AeonMQ6
Reply
#86
(2017-08-21, 19:25)Angelinas Wrote:
(2017-08-21, 17:58)badaas Wrote: @ Angelinas try:
Just try...And working like charm.....
All color are real color, evan blur image working,,,,Smile
Great work....

Image
Image

Phew! Enjoy Big Grin

This is more subtle color scheme

Code:
<onload>Skin.SetString(colorbox_main,main:)</onload>
<onload>Skin.SetString(colorbox_comp,main:hls*0.33;0;0@hsv*0;-0.1;0.3)</onload>
Reply
#87
2.0.4.1
* small fix for image:// files not being cached by kodi (this will mean for now if you use a lot plugin or resources for images, if you delete cache images will have to be remade, ie. http sourced content [I will fix this later])
* you can set vars 'lgint' & 'lgsteps' for color gradient change (steps and interval between steps in ms; defaults are lgint=10, lgsteps=50, so 50*10ms)

@ https://github.com/BADMS/script.colorbox
Reply
#88
(2017-08-21, 17:59)badaas Wrote: @filigran try:

Startup.xml:
Code:
<onload>SetProperty(SEVEN_daemon_set,True,home)</onload>
<onload>Skin.SetString(colorbox_main,main:)</onload>
<onload>Skin.SetString(colorbox_comp,comp:)</onload>
<onload condition="System.HasAddon(script.colorbox)">AlarmClock(nms1,SetProperty(NINE_manual_set,"var=main,set=$INFO[Skin.String(colorbox_main)]|
var=comp,set=$INFO[Skin.String(colorbox_comp)]",home),00:05,true)</onfocus>


On Home.xml somewhere:
Code:
<control type="multiimage" id="7977">
    <left>-2160</left>
    <imagepath background="true">$VAR[HomeContPic]</imagepath>
</control>

Code:
<control type="panel" id="301">
...
<focusedlayout ...>
    <control type="image">
        <texture>texture.png</texture>
        <colordiffuse>$VAR[HomeContColor]</colordiffuse>
    </control>
</focusedlayout>
...
</control>

Code:
<variable name="HomeContPic">
    <value condition="Container(301).Content(movie)">$INFO[Container(301).ListItem.Art(fanart)]</value>
    <value condition="!String.IsEmpty(Container(301).Listitem.Art(thumb))">$INFO[Container(301).ListItem.Art(thumb)]</value>
</variable>
<variable name="HomeContColor">
    <value condition="!String.IsEmpty(Window(home).Property(ImageColorSEVEN))">$INFO[Window(home).Property(ImageColorSEVEN)]</value>
</variable>

OR you can leave out the Container(301), as it will default to current focused item.
This should get you started.

Tested it, but it didn't work. I added
PHP Code:
<onload>RunScript(script.colorbox,daemon=True)</onload
and it's working, but not 100%. If you look at this it shows the issue. It works for all thumbs/fanarts but one, the one for Band of Brothers. It doesn't change colors? Not sure why? At 15 seconds is the issue ( https://youtu.be/rZkrnfIgNP0 ):

Hm.. guess the embedding doesn't work. Anyhoo, the link is above.
Reply
#89
Ok, turn on kodi-settings-system-logging-enabel debug logging, see if any errors in kodi.log

Also, delete userdata/addon_data/script.colorbox/
Reply
#90
Figured it out!

My bad; the episode didn't exist. I moved it recently, but never synced my library on the PC. So there was no image for colorbox to get information from. Smile
So, working great! Thanks for the help, and keep up the great work!
Reply
  • 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 15

Logout Mark Read Team Forum Stats Members Help
script.colorbox1