Kodi Community Forum
Release script.toolbox - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
---- Thread: Release script.toolbox (/showthread.php?tid=207618)

Pages: 1 2 3 4 5 6 7 8 9 10 11


RE: script.toolbox - sualfred - 2015-07-05

(2015-07-05, 10:55)Hitcher Wrote:
(2015-07-05, 08:56)sualfred Wrote: @phil65:
If got issues with commas in $LOCALIZE strings in the textviewer dialog. Is there any way to parse them?

Code:
text='"$VAR[Plot]"'

Nope. If I use "", no text will be displayed.


RE: script.toolbox - Hitcher - 2015-07-05

(2015-07-05, 11:00)sualfred Wrote:
(2015-07-05, 10:55)Hitcher Wrote:
(2015-07-05, 08:56)sualfred Wrote: @phil65:
If got issues with commas in $LOCALIZE strings in the textviewer dialog. Is there any way to parse them?

Code:
text='"$VAR[Plot]"'

Nope. If I use "", no text will be displayed.

That's a single ' followed by a double " quote.


RE: script.toolbox - sualfred - 2015-07-05

(2015-07-05, 10:55)Hitcher Wrote: That's a single ' followed by a double " quote.

Oops, didn't recognized them. Yes, that works. Thanks mate.


RE: script.toolbox - Fist - 2015-07-15

(2015-07-01, 08:20)janeczku Wrote: Looks like PIL is broken (again) in Kodi 15.0 Isengard beta 2 on Android:

Quote:23:22:58 T:1577542688 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: The _imaging C module is not installed
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.toolbox/default.py", line 230, in <module>
Main()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.toolbox/default.py", line 37, in __init__
image, imagecolor = Filter_Image(self.image_now, self.radius)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.toolbox/resources/lib/Utils.py", line 161, in Filter_Image
img.thumbnail((200, 200), Image.ANTIALIAS)
File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/Image.py", line 1559, in thumbnail
self.load()
File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/ImageFile.py", line 164, in load
self.load_prepare()
File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/PngImagePlugin.py", line 381, in load_prepare
ImageFile.ImageFile.load_prepare(self)
File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/ImageFile.py", line 231, in load_prepare
self.im = Image.core.new(self.mode, self.size)
File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/Image.py", line 37, in __getattr__
raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed
-->End of Python script error report<--
23:22:58 T:1356381096 DEBUG: ------ Window Init (DialogKaiToast.xml) ------

I posted a similar error in the Mimic forum. I get an error the first time I load a video, stream or music file in Kodi after boot.

Code:
16:03:01 T:1574669792   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: The _imaging C module is not installed
                                            Traceback (most recent call last):
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.toolbox-master/default.py", line 149, in <module>
                                                Main()
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.toolbox-master/default.py", line 35, in __init__
                                                image, imagecolor = Filter_Image(self.image_now, int(self.params.get("radius", 5)))
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.toolbox-master/resources/lib/Utils.py", line 177, in Filter_Image
                                                img.thumbnail((200, 200), Image.ANTIALIAS)
                                              File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/Image.py", line 1559, in thumbnail
                                                self.load()
                                              File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/ImageFile.py", line 164, in load
                                                self.load_prepare()
                                              File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/ImageFile.py", line 231, in load_prepare
                                                self.im = Image.core.new(self.mode, self.size)
                                              File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/Image.py", line 37, in __getattr__
                                                raise ImportError("The _imaging C module is not installed")
                                            ImportError: The _imaging C module is not installed
                                            -->End of Python script error report<--



RE: script.toolbox - mikeSiLVO - 2015-07-20

Updated to new script.toolbox and I now have an issue with the blur function. Downgrading to my older forked version fixes it. Is there a new method to use this functionality?
Here is my Debug Log.
Two logs in two threads... I feel like I am bad luck or something...
Sorry phil Confused


RE: script.toolbox - phil65 - 2015-07-20

Source image deleted / not available?
DEBUG: script.toolbox: Could not get image for '"D:\HD Movies 2\(500) Days of Summer (2009) 1080p BluRay\(500) Days of Summer (2009) 1080p BluRay-poster.jpg"' (try 2)


RE: script.toolbox - mikeSiLVO - 2015-07-20

Yeah I wasn't sure what to make of that...
Image is there in that location but shouldn't it be reading it from the DB and not the folder path?
Same library item using an older version of the script works fine. That is why I am confused Huh
Debug Log using older version works but updating using GitHub or Kodi repo version gives me the image not found error like in the last log. Not sure what else to do but If you need something else from me let me know.

Thanks and hopefully I am not doing something wrong Undecided


RE: script.toolbox - phil65 - 2015-07-20

will take a look when I find some minutes.


RE: script.toolbox - im85288 - 2015-07-20

In the latest version 1.1.0 the blur has also stopped working for me.

Code:
17:59:27 T:1420   DEBUG: script.toolbox: copy image from source: '"http://192.168.1.88:8096/mediabrowser/Items/50327c08fbb11ec78d90b1fd8d8b1278/Images/Primary/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=2bd5ba173cb6aaf478cfafeb91b171fb"'
17:59:27 T:1420 WARNING: XFILE::CFileFactory::CreateLoader - unsupported protocol('"http) in '"http://192.168.1.88:8096/mediabrowser/Items/50327c08fbb11ec78d90b1fd8d8b1278/Images/Primary/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=2bd5ba173cb6aaf478cfafeb91b171fb"'
17:59:27 T:1420   DEBUG: script.toolbox: Could not get image for '"http://192.168.1.88:8096/mediabrowser/Items/50327c08fbb11ec78d90b1fd8d8b1278/Images/Primary/0?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=2bd5ba173cb6aaf478cfafeb91b171fb"' (try 3)

This is what I think is the relevant information but please let me know if you need the full log or more details. Rolling back to 1.0.1 has it working fine.


RE: script.toolbox - Hitcher - 2015-07-20

Full log is always best.


RE: script.toolbox - Jayz2K - 2015-07-23

Hi Phil, regarding my previous request for export filter, just wonder if you can make these possible :

- Define a filename at export instead of the common skin.xxx.backup.txt
- Define a filename for import without browsing for file

The import / export works so fine that I thought about using this kind of process for first skin's startup. Your script is much faster than SetString (And I have a large amount of them) and could easily allow to build a setup at startup to allow the user to choose from wiewtypes and colorsets (horizontal / Vertical / Fullscreen / Black / White, etc ...). Files could be added to the skin's extra folder (extra/colorsets/ or extra/templates).

Something like this :

Import for startup
Code:
RunScript(script.toolbox,info=importskinsettings,path="extra/colorsets/Black_colorset.txt")

and

User defines name of export
Code:
RunScript(script.toolbox,info=exportskinsettings,text=MY_DUMMY_TEXT,prompt=true)

Thanx Smile


RE: script.toolbox - mikeSiLVO - 2015-07-27

(2015-07-20, 17:52)phil65 Wrote: will take a look when I find some minutes.

Friendly... I can wait indefinitely bump Smile. No rush at all just wanted to bring it to your attention one last time, that being said I think I have I an idea how hard you work and am thankful and appreciative of all the wonderful things you have done Big Grin
If I can be of any help at all please let me know.

Thanks for everything phil Wink


RE: script.toolbox - mbuzina - 2015-07-28

Not skinning at the moment, but I have an idea for a good function in your script:
Extract the primary colour (s) from a given image. This would allow a skin to adapt it's highlight colour to match the current fanart/background image. Windows 10 can do that with it's highlight colour (it will even match with each background when you use a background slide show).

Python input: http://stackoverflow.com/questions/3241929/python-find-dominant-most-common-color-in-an-image

Might need some additional input about the colour needed (e.g. needs a bright colour, needs a dark colour).


RE: script.toolbox - phil65 - 2015-07-28

(2015-07-28, 18:00)mbuzina Wrote: Not skinning at the moment, but I have an idea for a good function in your script:
Extract the primary colour (s) from a given image. This would allow a skin to adapt it's highlight colour to match the current fanart/background image. Windows 10 can do that with it's highlight colour (it will even match with each background when you use a background slide show).

Python input: http://stackoverflow.com/questions/3241929/python-find-dominant-most-common-color-in-an-image

Might need some additional input about the colour needed (e.g. needs a bright colour, needs a dark colour).

It´s already included since some months, Window(home).Property(imagecolor).
Gets filled after using info=blur.


RE: script.toolbox - Fist - 2015-07-29

Phil, still waiting for an answer on this bug, that I've now reproduced three Amazon Fire TVs:

http://xbmclogs.com/pmxjvawbu

Skin is Mimic (Script Toolbox is a dependency). Build is Isengard final.

Thanks


This forum uses Lukasz Tkacz MyBB addons.