• 1
  • 10
  • 11
  • 12(current)
  • 13
  • 14
  • 15
Release Embuary Helper Script
Edit: Figured this out using a hidden focuslayout button with <onfocus>: https://forum.kodi.tv/showthread.php?tid=288767
Thanks to @Hitcher for the solution

Original Post:

Apologies @sualfred in advance for the stupid question, I'm still fairly new to skinning and certainly to using scripts. 

I'd like to use the Calc function of your Embuary Helper to pass a value for tvshows or seasons of ((watched episodes / total episodes) * 100) to get a watched percentage I can use for an image control width.

I've only been able to get this working on a manual left/right click in my vertical list with the following syntax.

xml:

<onleft condition="System.HasAddon(script.embuary.helper) + [container.content(tvshows) | container.content(seasons)]">RunScript(script.embuary.helper,action=calc,do='"($INFO[ListItem.Property(WatchedEpisodes)] / $INFO[ListItem.Property(TotalEpisodes)]) * 100"',prop=MyResult)</onleft>
<onright condition="System.HasAddon(script.embuary.helper) + [container.content(tvshows) | container.content(seasons)]">RunScript(script.embuary.helper,action=calc,do='"($INFO[ListItem.Property(WatchedEpisodes)] / $INFO[ListItem.Property(TotalEpisodes)]) * 100"',prop=MyResult)</onright>

But I don't know where to put this RunScript for it to automatically trigger each time the contents of my container is refreshed.
Reply
(2019-11-03, 20:31)nuttersrest Wrote:
(2019-10-31, 20:02)Ingvix Wrote: Also you need to install libwebpmux2 which doesn't exist in Buster repo. I didn't realize it until I had autoremoved some packages that it was required by python-pil. 

Downgrading python-pil did not do it for me, I got an error that embuary helper script was not designed for this version of Pil. Upgrading it again to the latest version brough the array error message back.
Currently running Emmbuary Helper Script version 1.3.2. 
I forgot to mention that you need to use version 1.2.28 from the Kodi repo.
Reply
(2019-11-19, 16:30)Ingvix Wrote: I forgot to mention that you need to use version 1.2.28 from the Kodi repo. 

Or at least that's what I'm using and it works. I don't remember all the things I tested anymore when I was trying to get things work.
Reply
Hi,
I am getting error with latest version. Please see error log:
Pastebin
Reply
(2019-11-22, 13:34)james739 Wrote: Hi,
I am getting error with latest version. Please see error log:
Pastebin
FYI:
Platform is android and I'm using fork version of Kodi 18.3
Reply
try upgrading to 18.5. please always post a full log. it's related to your android version
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
Sad 
I would like to replace skin helper service with embuary helper for below code. How do I do it?THis is calling a selection dialogue:

Code:
<onload>RunScript(script.skin.helper.service,action=setskinsetting,setting=PopupPosition,header=$LOCALIZE[40392])</onload>
Reply
This feature is not available in my script.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
@sualfred Maybe you'll remember making a deeper and nicer implementation of 2 KyraDB Project possible with some really handy codes from your Embuary Helper Script.
-> Make possible to read out single entries of combined InfoLabels and showing for example it as a sideshow multiimage with label matching.

I just want to ask a question, but cause i follow your and @jurialmunkey 's project very carefully the i see the questions is already formulated very well:
Link: https://forum.kodi.tv/showthread.php?tid...pid2919219

It's not cause of the "showing" speed, i know it is bypassed so it can't even be as fast as normal artwork stuff. Last content is visible until it gets new content + a delay (it depends on the machine 1-3 seconds)
Behave now: scolling to a movie -> open dialogvideoinfo -> 1-3 seconds the (multi)-image gets loaded -> go out from dialogvideoinfo, scroll to a new one, open dialogvideoinfo -> last image is showing 1-3 seconds until new matching content gets loaded.

Is there a possibility to unload the images? I mean to not show the previous ones? Change the behave...
I hope you know what i mean, we're both german bot my english is really not the yellow of the egg.

Much appreciate your project  Nod
Reply
Hi @sualfred have ever tried the Matrix version of your script on your Shield? It errors out for me on Android while it's working fine on Windows.
Reply
(2020-05-17, 00:34)puenktchen Wrote: Hi @sualfred have ever tried the Matrix version of your script on your Shield? It errors out for me on Android while it's working fine on Windows.

@puenktchen, it might be because, as far as I know, there is no PIL for Kodi 19 for Android.

Regards,

Bart
Reply
(2020-05-17, 02:25)bsoriano Wrote:
(2020-05-17, 00:34)puenktchen Wrote: Hi @sualfred have ever tried the Matrix version of your script on your Shield? It errors out for me on Android while it's working fine on Windows.

@puenktchen, it might be because, as far as I know, there is no PIL for Kodi 19 for Android.

Regards,

Bart   
Mmh, PIL seem to exist but a method or library that is called from PIL is missing in Python 3.7
Code:
EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'ImportError'>
Error Contents: Cannot load library:
Traceback (most recent call last):
 File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.embuary.helper/service.py", line 6, in <module>
   from resources.lib.service_monitor import *
 File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.embuary.helper/resources/lib/service_monitor.py", line 12, in <module>
   from resources.lib.utils import split
 File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.embuary.helper/resources/lib/utils.py", line 20, in <module>
   from resources.lib.image import *
 File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.embuary.helper/resources/lib/image.py", line 12, in <module>
   from PIL import ImageFilter,Image,ImageOps
 File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/Image.py", line 66, in <module>
   from PIL import _imaging as core
 File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/_imaging.py", line 7, in <module>
   __bootstrap__()
 File "/data/data/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/_imaging.py", line 6, in __bootstrap__
   imp.load_dynamic(__name__,__file__)
 File "/data/app/org.xbmc.kodi-2/base.apk/assets/python3.7/lib/python3.7/imp.py", line 342, in load_dynamic
   return _load(spec)
ImportError: Cannot load library:
-->End of Python script error report<--
Reply
PIL is currently broken on Android for Matrix.
https://github.com/xbmc/xbmc/pull/17794
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
(2019-07-21, 09:38)sualfred Wrote: @wyrm 
https://github.com/sualfred/script.embua...b1fb2e9a83

Call (see guisettings.xml for reference):
Code:
RunScript(script.embuary.helper,action=getkodisetting,setting=locale.country)

Returns:
Code:
Window(home).property(locale.country)
Example: "Australia (12h)"


Call with stripping the time format:
Code:
RunScript(script.embuary.helper,action=getkodisetting,setting=locale.country,strip=timeformat)

Returns:
Code:
Window(home).property(locale.country)
Example: "Australia"
@sualfred ,

sorry dropped off of the side of the world for a little whiile there, brought a new house just before this covid business kicked off. Only just getting back to Kodi and skinning. Thank you for the above, for the most part it is working very well. Unfortunately have spotted a couple of little problems.

First issue is that the strip time format works great except for Spain, which returns España(blah). The España is fine, just that the brackets and text are not stripped off as they should be. My guess is because unlike most countries Spain does not seem to use AM/PM for morning and afternoon (sorry can't remember what was used, just that it was four characters long).

The second issue is I suspect a Kodi bug and nothing to do with your script but I thought I would run it past you to check. Changing location to Denmark results in nothing showing in the Region default format on the Regional settings page, and so your script returns nothing.

Other that those two issues the location is returning correctly and the Certification icons are working really well in my skin. Is much faster that previous method and I already support more certification icon types than any other skin, so a massive win on my part.

Thank you for your part in this.
Wyrm
Reply
@sualfred ,

Another issue that hopefully you can help with. Have moved my skin from using Skin helper service to your script and am trying to get rid of a couple of custom dialogs while I am about it. I use the following code in my VideoInfo dialog to provide a selection type list of additional user options.
 
Code:
<control type="button" id="1115">
    <!-- More options button -->
    <include>info-options-common</include>
    <label>$LOCALIZE[31693]</label>
    <texturefocus>button-info-more-focus.png</texturefocus>
    <texturenofocus>button-info-more.png</texturenofocus>
    <onclick>SetProperty(Dialog.1.Label,$LOCALIZE[31680])</onclick>
    <onclick>SetProperty(Dialog.1.BuiltIn,SendClick(movieinformation,10))</onclick>
    <onclick>SetProperty(Dialog.2.Label,$LOCALIZE[38023])</onclick>
    <onclick>SetProperty(Dialog.2.BuiltIn,SendClick(movieinformation,7))</onclick>
    <onclick>SetProperty(Dialog.3.Label,$ADDON[script.artwork.beef 32411])</onclick>
    <onclick condition="System.HasAddon(script.artwork.beef) + $EXP[isnotEmptyDBID]">SetProperty(Dialog.3.BuiltIn,RunScript(script.artwork.beef, mode=gui,mediatype=$INFO[ListItem.DBTYPE],DBID=$INFO[ListItem.DBID]))</onclick>
    <onclick condition="System.HasAddon(script.metadata.editor) + $EXP[isnotEmptyDBID]">SetProperty(Dialog.4.Label,$LOCALIZE[31689])</onclick>
    <onclick condition="System.HasAddon(script.metadata.editor) + $EXP[isnotEmptyDBID]">SetProperty(Dialog.4.BuiltIn,RunScript(script.metadata.editor,dbid=$INFO[ListItem.DBID],type=$INFO[ListItem.DBType]))</onclick>
    <onclick condition="System.HasAddon(script.libraryeditor) + !System.HasAddon(script.metadata.editor) + $EXP[isnotEmptyDBID]">SetProperty(Dialog.5.Label,$LOCALIZE[31689])</onclick>
    <onclick condition="System.HasAddon(script.libraryeditor) + !System.HasAddon(script.metadata.editor) + $EXP[isnotEmptyDBID]">SetProperty(Dialog.5.BuiltIn,RunScript(script.libraryeditor,DBID=$INFO[ListItem.DBID]))</onclick>
    <onclick>RunScript(script.embuary.helper,action=createselect,header=$LOCALIZE[31693])</onclick>
</control>

I have tried to come up for a way to conditionally show items in the selection dialog that the above code brings up. I know that your script checks for an empty label to signal the end of the list of items so the dialog.x.builtin seems to be the better property to place the condition on, but that still shows the label for the entry. Is there a dialog.x. property to control the conditional display of a selection item without cutting off the rest of the selection options?

Wyrm
Reply
  • 1
  • 10
  • 11
  • 12(current)
  • 13
  • 14
  • 15

Logout Mark Read Team Forum Stats Members Help
Embuary Helper Script3