Kodi Community Forum

Full Version: script.litebox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ambex skin will show how, plus same as colorbox but less clutter.

Thanks to @Angelinas & @drinfernoo

My REPO with Ambex: [ https://github.com/BADMS/repository.BADM...-1.0.0.zip ]
Now live in Kodi repo.
@badaas 

I am currently trying to include the litebox script. But i have a few questions:

Could you please explain these values and what they are for? 

Ambex:
xml:
var=main,set=main:|var=comp,set=comp:hsv*0;-0.1;0.3)

Arctic Zephyr 2:
xml:
var=main,set=main:fhls*-;0.45;0.9)|var=comp,set=main:hls*0.75;0;0@fhls*-;0.45;0.9)

- Sometimes, litebox doens't use the new values, especially when changing values, that are releated to the choosen effect, like pixelsize, blursize,.. How to trigger that correctly?
- Sometimes using "Pixelate" and navigate on each item on Widgets: sometime is good, sometime pixel become very big for the same item (@Nanomani)
- Is it okay, to use a second image control with id 7975 in a custom dialog, for effect settings? Could this be the reason for the issues?

To be clear: After restarting kodi, when new values are set, everything is working fine.  But always restarting kodi, after changing litebox settings is not e good experience :/ 

So, is there a method, how to trigger litebox, to use new settings, except restating kodi?


EDIT: had allready tested and all issues, i have had got solved. If litebox got started by

Code:
RunScript(script.colorbox,daemon=True)
 
and it was started/running before, e.g. in startup.xml, I had the issues I mentioned.

But now i have found a solution Smile 

Thanks for your great script and thanks to @Nanomani for helping with testing Smile
If the image path cames from an addon and is like

Code:
image://X%3a%5cMovies%5cHD%....

Could you do something, that litebox script can also use/read this type of image path?

Smile
@badaas

Thanks for this script which was easy to get running, providing great and fast results.

Would it be possible to blur 2 images at the same time?
Eg. both fanart and a background image on top (with 50% opacity)?
Can you update litebox to work with thumbnail path substitution?
Just FYI
with some NIX (eg Libreelec 12 beta) system "Pillow" is update to 10.0.0

So this addon need to be update because some "Constants" are removed with Pillow 10.0.0
source : https://pillow.readthedocs.io/en/stable/...#constants

This fix some issue in some case :

search and replace "Image.ANTIALIAS" by "Image.LANCZOS" in
...\addons\script.litebox\resources\lib\utils.py

This seems too simple but this works well for me.
If this can help someone...
@Nanomani

Can I ask you how to use this script, since I didn't find a wiki, and if it is possible to use it to have a blurred background of an image?

$INFO[ListItem.Art(fanart)]   --->   Blurred Fanart

exactly as:
https://github.com/jurialmunkey/plugin.v...ur-monitor
$INFO[Window(Home).Property(TMDbHelper.ListItem.BlurImage)]

Just that this monitor is slow, and I would like to blur my image much faster, or preload it in some way.


Thank you for your support.
(2024-02-23, 16:27)Andrea1998 Wrote: [ -> ]@Nanomani

Can I ask you how to use this script, since I didn't find a wiki, and if it is possible to use it to have a blurred background of an image?

$INFO[ListItem.Art(fanart)]   --->   Blurred Fanart

exactly as:
https://github.com/jurialmunkey/plugin.v...ur-monitor
$INFO[Window(Home).Property(TMDbHelper.ListItem.BlurImage)]

Just that this monitor is slow, and I would like to blur my image much faster, or preload it in some way.


Thank you for your support.

I m not a expert. Smile
"script.litebox" provide not only blur effect.
The script are little bit more complex than with "plugin.video.themoviedb.helper".

If you are curious you can look the code in public skin "Arctic: Zephyr - Reloaded" that use "script.litebox".

But feature "blur effect" with "script.litebox" or "script.embuary.helper" works n Windows OS but don't works anymore on Libreelec 12.
The reason is the version 10 of Pillow (PIL) with Libreelec 12.

On Windows and Kodi 22 PIL will be update too to v10,x.
https://github.com/xbmc/xbmc/pull/24010

For my custom skin needs, I only use "plugin.video.themoviedb.helper".
Because "script.litebox" or "script.embuary.helper" are no longer updated or corrected by the authors.
IMHO the use of these addons will be a problem in time unfortunately.

"plugin.video.themoviedb.helper" are not so slow for me...
First time this can take 1s perhaps. But after when the blur is generated the picture is in cache and stored in :
"userdata\addon_data\plugin.video.themoviedb.helper\blur_v2"
(2024-02-23, 20:14)Nanomani Wrote: [ -> ]For my custom skin needs, I only use "plugin.video.themoviedb.helper".
Because "script.litebox" or "script.embuary.helper" are no longer updated or corrected by the authors.
IMHO the use of these addons will be a problem in time unfortunately.

"plugin.video.themoviedb.helper" are not so slow for me...
First time this can take 1s perhaps. But after when the blur is generated the picture is in cache and stored in :
"userdata\addon_data\plugin.video.themoviedb.helper\blur_v2"
I understand that it could be a problem for the future, if they are not updated it will actually be a problem.

Unfortunately yes, I intend to explore the new sections of the movies, each time it will load the background in 1 second, and I have a modified skin that generates the title and the rest almost immediately you notice the slowness of the background.

At this point I hope to be able to find a solution to try to load the blurry background image in the background task, so as to display it faster, even if it will be difficult to do so.


Thanks for your help, I appreciate it.