Kodi Community Forum

Full Version: Embuary Helper Script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
It's just muting the error and disables the image blurring function to prevent the service from stopping.

The error is related to the Paython PIL module that is shipped with TVOS.
Thank you!
Will you push this fix to the Kodi 17 Emby repo?
Should already be there since yesterday evening.
@Karellen 
Thanks.
@manfeed @"chrissix" 

I've wasted some hours to get a documentation done (or let's say 95% done).
https://github.com/sualfred/script.embuary.helper/wiki
@manfeed @"chrissix" 

I've changed bydbid to getbyid to follow the naming scheme. Updated versions are on my repo. You have to change it on your end.
@sualfred,

Could we please get a couple of new functions added to your script.

Locale country name, and Addon is enabled. Both of these are available thru Kodi JSON interface, but country name will probable need to have clock format stripped from end of string.

Country name can then be used for new way to access MPAA certification icons as described by thread elsewhere on this forum.

Addon is enabled check can be used with your Enable addon function to allow users to reenable disabled addons from within skins skin settings menus (for skin supported addons).

Thanks mate.
Wyrm
@wyrm 

Locales: So you want the system locale? Like DE, EN, etc? Or what exactly do you mean?

Addon is enabled: Is already available as builtin by Kodi -> System.HasAddon(script.foo.bar). This only returns true if installed and enabled.
(2019-07-19, 08:34)sualfred Wrote: [ -> ]I've changed bydbid to getbyid to follow the naming scheme. Updated versions are on my repo. You have to change it on your end.
Great! I haven't testet the Focus monitor solution yet cause u said it's too slow and resource consuming.

Bot i've testet both other solutions!

Played around hours with the skin hack solution cause it was promising as the fastest one.
But with this i all my images and textures are crashing one after the other, first main fanart then the rest.
First i thought this solution only doesn't like ArtworkHelper and ExtendedInfo, but even when deinstalled both and tried on vanilla standard skin the same happens.
This solution is not practcial on my side.

Then i tested the RunScript to split a value solution, this is working fine on my side! Everything running fine without problems!
The rest is just a matter of my .xml knowledge.
@sualfred,

(2019-07-19, 11:07)sualfred Wrote: [ -> ]@wyrm 

Locales: So you want the system locale? Like DE, EN, etc? Or what exactly do you mean?

Yes, I would like System locale, in full form by preference, but short form codes like above if that is all is provided. My understanding was that the JSON provided full country name with (12h) or (24h) to denote if 12 or 24 hour clock used. So for my country it would return Australia(12h). In this case I would want the (12h) stripped off of the string and just the Australia returned.

Quote:Addon is enabled: Is already available as builtin by Kodi -> System.HasAddon(script.foo.bar). This only returns true if installed and enabled.

Will check to make sure but pretty sure this only checks if addon is installed. Will return true if addon installed but disabled... Yep, just checked my code. Unless behaviour has changed for Matrix, System.HasAddon only checks if installed, not if addon is enabled/disabled.

Wyrm
In Leia it returns false if the addon is disabled. I use it a lot im Embuary for exactly the same scenario.
Must be a bug in Matrix then, because it makes it pretty much useless otherwise.

So you want the geographical position or what exactly do you want to achieve? Getting the regional setting of Kodi?
(2019-07-19, 16:28)wyrm Wrote: [ -> ]@sualfred,
Quote:Addon is enabled: Is already available as builtin by Kodi -> System.HasAddon(script.foo.bar). This only returns true if installed and enabled.

Will check to make sure but pretty sure this only checks if addon is installed. Will return true if addon installed but disabled... Yep, just checked my code. Unless behaviour has changed for Matrix, System.HasAddon only checks if installed, not if addon is enabled/disabled.

Wyrm        

Sorry Sualfred, was trying to describe from memory what the issue I was having to need function to return addon enabled was. Got it wrong, System.HasAddon does work as you suggested, just not quite what I need.

Code:
                    <control type="group" id="714">
                        <height>84</height>
                        <width>1328</width>
                        <control type="togglebutton" id="715">
                            <!-- Upnext service script install/config -->
                            <onup>713</onup>
                            <ondown>717</ondown>
                            <onright>999</onright>
                            <include>settings-submenu-common</include>
                            <textwidth>1178</textwidth>
                            <label>$LOCALIZE[24020]</label>
                            <altlabel>$LOCALIZE[24038]</altlabel>
                            <align>right</align>
                            <onclick>Addon.OpenSettings(service.upnext)</onclick>
                            <altclick>InstallAddon(service.upnext)</altclick>
                            <usealttexture>!System.HasAddon(service.upnext)</usealttexture>
                        </control>
                        <control type="label">
                            <include>settings-submenu-common</include>
                            <label>$ADDON[service.upnext 30045]</label>
                            <textoffsetx>27</textoffsetx>
                        </control>
                    </control>

Is the code I use to allow user to either install or configure an already installed addon. Only issue is if the addon has already been installed and then disabled, my code will still show Install as button click action. What should show in this case is Enable addon (and change function to enable addon), but there is no way thru the skin engine to know if addon is installed but just disabled.

Wyrm
(2019-07-19, 17:01)sualfred Wrote: [ -> ]So you want the geographical position or what exactly do you want to achieve? Getting the regional setting of Kodi?

Once again sorry sualfred, thought you had been a party to this conversation where I outlined my efforts to bring in MPAA icons for a skin to display in a quick, scalable way. As different locations might have common certification types but different icons, the easiest way to distinguish between the various files in the resource file I created was to include the location (country) of the users computer in the name of each graphics file in the resource file.

The original code I planned to use to display the correct icon was as follows

Code:
  <texture>$INFO[ListItem.Mpaa,special://skin/extras/flags/Mpaa/,.png]</texture>

but nothing is ever quite as simple as it first seems, as getting support to include the country name in scrapped MPAA results is proving elusive. If I can pull the users current location into the skin engine (full Country name as it looks better if I should choose to display the text elsewhere in the skin) I can build the correct file name for the appropriate image and as I now have to build the file name from MPAA string and a Country string, could give user the option to use default United States icons instead.

Hope the request makes a little more sense now.

Wyrm
@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 for a great script, I've been using ColorBox for bluring in my skin and as I only use bluring I'm moving across to Embury helper. The only thing killing it for me at the moment is the delay

Code:
MONITOR.waitForAbort(1)

This is just far to long for scrolling through a list and expecting the artwork to keep up, ColorBox uses a monitor wait of 0.2 seconds, is there any chance this could be changed to a shorter fixed value or even use a skin setting so if people need to change it they can set it themselves.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15