• 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 15
Release Embuary Helper Script
#61
Dunno if this is a good idea for slow devices. I guess lowering to 0.5 is the minimum I would go. Blurring isn't the only thing that is running in the service.
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
#62
(2019-07-20, 16:31)sualfred Wrote: Dunno if this is a good idea for slow devices. I guess lowering to 0.5 is the minimum I would go. Blurring isn't the only thing that is running in the service.

Which is why I suggested maybe using a skin setting so if people like myself need the bluring function then we can set it to a lower value.

After a quick glance at the code the only other things that seem to run during the monitor loop are the infolabel splitter, which only runs if FocusMonitor is set, and the grab/set fanart functions which are on there own timer which could be slowed down. The infolabel splitter could also be put on a timer so it isn't run on every loop.

As it currently is the bluring function is pretty much unusable, which is a shame because it's a lot simpler to use than ColorBox.
Reply
#63
i am still on testing but to mention this code is really working fine on dialogvideoinfo, now tested out on normal views but doesn't work there at all:
plugin://script.embuary.helper/?info=getresourceimages&addon=resource.images.actorart&string='$ESCINFO[ListItem.Cast]'

Have also tested countries with the same code, this is also working fine in views!
Still ned to test directors and other...

EDIT: Sorry i forgot the usual Cast InfoLabel is only for dialogvideoinfo!
@manfeed skin hack also works in every view, probably the reason his code is that heavy and complicated.
Reply
#64
just add a hidden container with the getbydbid arg to get listitem.cast in in a view.
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
#65
@roidy 

"useless" is wrong. It works perfectly fine with in Embuary without any noticeable delay and fadetime.

But please check and report back if this makes it better for your usecase:
https://github.com/sualfred/script.embua...1fe701314d

You also can set a own skin setting to adjust the value -> Skin.String(ServiceInterval). A service restart is required after it.
Only keep in mind that you should use even numbers and "." instead of "," for settin the string.
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
#66
(2019-07-20, 21:59)sualfred Wrote: getbydbid arg
You mean this? 
Code:
plugin://script.embuary.helper?info=getcast&type=$INFO[ListItem.DBType]&dbid=$INFO[ListItem.DBID]
Quote:add a hidden container
you mean a second container list?
____
If this is my simplified main code:
Code:
        <control type="group">        
            <control type="list" id="345">
                <left>3000</left>
                <height>1</height>
                <width>1</width>
                <autoscroll>true</autoscroll>
                <scrolltime>5000</scrolltime>
                <itemlayout/>
                <focusedlayout/>
                <content>plugin://script.embuary.helper/?info=getresourceimages&addon=resource.images.actorart&string='$ESCINFO[ListItem.Cast]'</content>
            </control>
            <control type="image">
                <left>1000</left>
                <top>150</top>            
                <width>548</width>
                <height>548</height>        
                <texture background="true">$INFO[Container(345).ListItem.Icon]</texture>              
            </control>
            </control>
___
i should built something like this:

Code:
        <control type="group">        
            <control type="list" id="344">
                <left>3000</left>
                <height>1</height>
                <width>1</width>
                <autoscroll>true</autoscroll>
                <scrolltime>5000</scrolltime>
                <itemlayout/>
                <focusedlayout/>
                <content>plugin://script.embuary.helper?info=getcast&amp;type=$INFO[ListItem.DBType]&amp;dbid=$INFO[ListItem.DBID]</content>
            </control>        
            <control type="list" id="345">
                <left>3000</left>
                <height>1</height>
                <width>1</width>
                <autoscroll>true</autoscroll>
                <scrolltime>5000</scrolltime>
                <itemlayout/>
                <focusedlayout/>
                <content>$INFO[Container(344).plugin://script.embuary.helper/?info=getresourceimages&addon=resource.images.actorart&string='$ESCINFO[ListItem.Cast]'</content>
            </control>
            <control type="image">
                <left>1000</left>
                <top>150</top>            
                <width>548</width>
                <height>548</height>        
                <aspectratio align="center" aligny="bottom">keep</aspectratio>
                <texture background="true">$INFO[Container(345).ListItem.Icon]</texture>                
                <fadetime>1000</fadetime>                                
            </control>
        </control>
____
Reply
#67
the hours has past away and now i got this, the images are showing but complete random, i think it's going though the whole cast list and not skipping the emptys:

Code:
        <control type="group">        
            <control type="list" id="344">
                <left>3000</left>
                <height>1</height>
                <width>1</width>
                <autoscroll>true</autoscroll>
                <scrolltime>5000</scrolltime>
                <itemlayout/>
                <focusedlayout/>
                <content>plugin://script.embuary.helper?info=getcast&amp;type=$INFO[ListItem.DBType]&amp;dbid=$INFO[ListItem.DBID]</content>
            </control>        
            <control type="list" id="345">
                <left>3000</left>
                <height>1</height>
                <width>1</width>
                <autoscroll>true</autoscroll>
                <scrolltime>5000</scrolltime>
                <itemlayout/>
                <focusedlayout/>
                <content>plugin://script.embuary.helper/?info=getresourceimages&addon=resource.images.actorart&string='$ESCINFO[Container(344).ListItem.Label]'</content>
            </control>
            <control type="image">
                <left>1000</left>
                <top>150</top>            
                <width>548</width>
                <height>548</height>        
                <aspectratio align="center" aligny="bottom">keep</aspectratio>
                <texture background="true">$INFO[Container(345).ListItem.Icon]</texture>                
                <fadetime>1000</fadetime>                                
            </control>
        </control>
Reply
#68
No.

wrong: <content>$INFO[Container(344).plugin://script.embuary.helper/?info=getresourceimages&addon=resource.images.actorart&string='$ESCINFO[ListItem.Cast]'</content>
correct <content>plugin://script.embuary.helper/?info=getresourceimages&addon=resource.images.actorart&string='$ESCINFO[Container(344).ListItem.Cast]'</content>

You have to take the cast value from something that has it stored.
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
#69
Works perfectly big thanks Smile
Reply
#70
@roidy 

is 0.5 enough or have you lowered it?
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
#71
(2019-07-20, 11:19)sualfred Wrote: @wyrm 
The common user don't set his region properly. A German user for example sets his language to "German", but doesn't change his region from Belgium (default for whatever reason) to Germany.

You already can do this:
https://github.com/sualfred/script.embua...tem-locale
This returns the system locale instead of the Kodi one.

And build a variable based on the returned value:
https://www.iban.com/country-codes

xml:
<variable name="longcountry">
<value condition="String.IsEqual(Window(home).Property(SystemLocale),DE">Germany</value>
.....
<value>foobar</value>
</variable>

Is this enough, or do you really need the Kodi set one that is set in guisettings.xml?

sualfred, thanks but using above leads to a monster $VAR which is what I was trying to avoid in the first place. Now the condition checks are a lot simpler that those it would replace, but there still would be scaling and speed issues heading in this direction.

While I find your example of misconfiguration interesting, it's a simple fix on the part of the user. Also just how far should us skin writers go to protect the user from themselves?

I guess what I am trying to say in my rambling manner is Yes, really need the Kodi country name.

Wyrm
Reply
#72
@wyrm 

K. Gimme a few minutes.
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
#73
(2019-07-21, 08:57)sualfred Wrote: @roidy 

is 0.5 enough or have you lowered it?

I'm using 0.2 the same as ColorBox which works fine. 0.5 is still a little too slow for my use case.

Another suggestion, in Image.py the image_filter function line 37 it might be worth keeping track of the image value and only call the image_blur function if it has changed. image_blur contains hashing and file system checking and i'm not sure of the impact of running them faster that once per half second or even second.

For instance:-
python:
old_image = ""

def image_filter(prop='listitem',file=None,radius=BLUR_RADIUS):
  image = file if file is not None else xbmc.getInfoLabel('Control.GetLabel(%s)' % BLUR_CONTAINER)
  try:
    radius = int(radius)
  except ValueError:
    log('No valid radius defined for blurring')
    return
  if image and image != old_image:
    old_image = image
    blurred_image, imagecolor = image_blur(image,radius)
    winprop(prop + '_blurred', blurred_image)
    winprop(prop + '_color', imagecolor)
Reply
#74
@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"
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
#75
@roidy 

Thanks for the suggestion, but that won't work without storing the name as window property as cache. And this is much more expensive than just checking if the file already exists. If file is already exists it's just updating the window property.

Edit:
"Fun fact" -> A reason why the skin helper service stuff got so slow is its caching. Sometimes it's better to keep it simple.
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
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 15

Logout Mark Read Team Forum Stats Members Help
Embuary Helper Script3