Kodi Community Forum
Release script.embuary.helper - a skin helper service / widgets alternative - 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.embuary.helper - a skin helper service / widgets alternative (/showthread.php?tid=345471)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28


RE: script.embuary.helper - a skin helper service / widgets alternative - 2WhlWzrd - 2020-01-07

I'm occasionally seeing an "Embuary Helper error Check the log for more information" when browsing through the library.
What is causing this?
Embuary Helper error log 0


RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2020-01-07

Which skin?

Edit:
Ah ftv.

@Hitcher
You need to exclude listitem.dbtype -> "set" for the getbydbid action


RE: script.embuary.helper - a skin helper service / widgets alternative - Hitcher - 2020-01-07

I used the example from the wiki.

https://github.com/sualfred/script.embuary.helper/wiki/Widgets:-Special-content#get-item-details-by-dbid

plugin://script.embuary.helper/?info=getbydbid&dbid=$INFO[ListItem.DBID]&type=$INFO[ListItem.DBType]


RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2020-01-07

I have no checks implemented. It's better to use a $VAR[] with a check for existing ListItem.DBID + ListItem.DBType is movie, tvshow, episode or season.


RE: script.embuary.helper - a skin helper service / widgets alternative - Chillbo - 2020-01-08

Thinking about adopting this script for my skin as well... Just wondering: Can the RunScript(script.embuary.helper,action=calc,do='"(10 + 5) / 2"',prop=MyResult) action also pickup values to calculate from infolabels?
I'd like to use this to calculate the current output aspect ratio whenever opening a window. To be able to do this - as Kodi doesn't provide any aspect ratio infolabel that is not the (very buggy) skin aspect ratio infolabel - I can only see the option to calculate the aspect ratio using a script.


RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2020-01-08

info labels are working


RE: script.embuary.helper - a skin helper service / widgets alternative - Hitcher - 2020-01-08

(2020-01-07, 21:37)sualfred Wrote: I have no checks implemented. It's better to use a $VAR[] with a check for existing ListItem.DBID + ListItem.DBType is movie, tvshow, episode or season.
OK thanks.


RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2020-01-08

(2020-01-08, 19:18)Hitcher Wrote:
(2020-01-07, 21:37)sualfred Wrote: I have no checks implemented. It's better to use a $VAR[] with a check for existing ListItem.DBID + ListItem.DBType is movie, tvshow, episode or season.
OK thanks. 

But be aware of "*all season". This item has dbtype "season" but isn't callable with JSON. Integer.IsGreaterOrEqual(ListItem.Season,0) should be fine. As far as I remember there was no problem with specials, which have "0".


RE: script.embuary.helper - a skin helper service / widgets alternative - Hitcher - 2020-01-10

As soon as I switch to using a VAR the list doesn't get populated.

Works -

xml:
        <control id="9001" type="list">
            <include>HiddenHomeList</include>
            <visible>System.HasAddon(script.embuary.helper) + !String.IsEmpty(ListItem.DBID)</visible>
            <content>plugin://script.embuary.helper/?info=getbydbid&amp;dbid=$INFO[ListItem.DBID]&amp;type=$INFO[ListItem.DBType]</content>
        </control>

Doesn't work -

xml:
        <control id="9001" type="list">
            <include>HiddenHomeList</include>
            <visible>System.HasAddon(script.embuary.helper)</visible>
            <content>$VAR[EmbuaryItemDetails]</content>
        </control>

xml:
    <variable name="EmbuaryItemDetails">
        <value condition="!String.IsEmpty(ListItem.DBID) + [String.Compare(ListItem.DBType,movie) | String.Compare(ListItem.DBType,tvshow) | String.Compare(ListItem.DBType,episode)]">plugin://script.embuary.helper/?info=getbydbid&amp;dbid=$INFO[ListItem.DBID]&amp;type=$INFO[ListItem.DBType]</value>
        <value></value>
    </variable>

Any ideas?


RE: script.embuary.helper - a skin helper service / widgets alternative - User 405025 - 2020-01-10

(2020-01-10, 12:34)Hitcher Wrote: As soon as I switch to using a VAR the list doesn't get populated.

Works -

xml:
        <control id="9001" type="list">
            <include>HiddenHomeList</include>
            <visible>System.HasAddon(script.embuary.helper) + !String.IsEmpty(ListItem.DBID)</visible>
            <content>plugin://script.embuary.helper/?info=getbydbid&amp;dbid=$INFO[ListItem.DBID]&amp;type=$INFO[ListItem.DBType]</content>
        </control>

Doesn't work -

xml:
        <control id="9001" type="list">
            <include>HiddenHomeList</include>
            <visible>System.HasAddon(script.embuary.helper)</visible>
            <content>$VAR[EmbuaryItemDetails]</content>
        </control>

xml:
    <variable name="EmbuaryItemDetails">
        <value condition="!String.IsEmpty(ListItem.DBID) + [String.Compare(ListItem.DBType,movie) | String.Compare(ListItem.DBType,tvshow) | String.Compare(ListItem.DBType,episode)]">plugin://script.embuary.helper/?info=getbydbid&amp;dbid=$INFO[ListItem.DBID]&amp;type=$INFO[ListItem.DBType]</value>
        <value></value>
    </variable>

Any ideas?

string compare has changed to string.isequal([string],value)


RE: script.embuary.helper - a skin helper service / widgets alternative - Hitcher - 2020-01-10

Haha, not with it today.

Thanks.


RE: script.embuary.helper - a skin helper service / widgets alternative - bsoriano - 2020-01-19

@sualfred , would you consider adding a details_by_episode function to the script so that you can get tv show details info as window properties when what you have focused is an episode? I want to open an episode info window using the videodb:// path for the episode in a custom search dialog, but there is no ListItem info label for the tv show dbid, so I cannot build the full path videodb://tvshows/titles/<tv show dbid>/<season>/<episode dbid>?season=<season>&tvshowid=<tv show dbid>.  I have the season and the episode dbid, but not the tv show dbid.  Thanks for considering my request.

Regards,

Bart


RE: script.embuary.helper - a skin helper service / widgets alternative - User 405025 - 2020-01-25

Hi, i got an little 'issue' when try to blur images.

Most of the time its fine, but on some movie items it fails to blur image , even if it exists.

If i refresh the movie, the image can be blurred an all is working fine.

Unsure if that'll help

i packed a zip file, with MyVideos116.db ,log , and used nfo Files of 2 movies, where this was an issue. (each for before and after refresh)
https://drive.google.com/file/d/1Gz2Jv1UVUOarv8_FwY0WQMmzLEVv7SNI/view?usp=sharing

Log Snippet
log:
2020-01-25 07:58:02.221 T:13696   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeDecodeError'>
                                            Error Contents: 'ascii' codec can't decode byte 0xc3 in position 25: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "C:\apps\Kodi Leia\portable_data\addons\script.embuary.helper\default.py", line 43, in <module>
                                                Main()
                                              File "C:\apps\Kodi Leia\portable_data\addons\script.embuary.helper\default.py", line 19, in __init__
                                                self.getactions()
                                              File "C:\apps\Kodi Leia\portable_data\addons\script.embuary.helper\default.py", line 39, in getactions
                                                util(self.params)
                                              File "C:\apps\Kodi Leia\portable_data\addons\script.embuary.helper\resources\lib\utils.py", line 208, in encode
                                                winprop(prop,url_quote(string))
                                              File "C:\apps\Kodi Leia\portable_data\addons\script.embuary.helper\resources\lib\helper.py", line 125, in url_quote
                                                string = string.encode('utf-8')
                                            UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 25: ordinal not in range(128)
                                            -->End of Python script error report<--
2020-01-25 07:58:03.848 T:14736  NOTICE: [ script.embuary.helper ] Image blurring: Image has not changed. Skip H:\Filme\Bringing Out the Dead - Nächte der Erinnerung (1999)\Bringing Out the Dead - Nächte der Erinnerung (1999)-fanart.jpg.
2020-01-25 07:58:05.368 T:14736  NOTICE: Previous line repeats 2 times.
2020-01-25 07:58:05.368 T:14736  NOTICE: [ script.embuary.helper ] Image blurring: Image changed. Blur H:\Filme\Bridge of Spies Der Unterhändler (2015)\Bridge of Spies Der Unterhändler (2015)-fanart.jpg.
2020-01-25 07:58:05.369 T:14736  NOTICE: [ script.embuary.helper ] Use fallback average color: FFF0F0F0



RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2020-01-25

I don't see any difference of the stored fanart path of "Bridge of Spies".
Both are having : H:\Filme\Bridge of Spies Der Unterhändler (2015)\Bridge of Spies Der Unterhändler (2015)-fanart.jpg

Weird that it works after you refreshed the item. Umlauts are no problem. Fixed that months ago.

But where does this exception came from? It's not related to the image blurring. What are you doing in this moment so I can reproduce it?


RE: script.embuary.helper - a skin helper service / widgets alternative - User 405025 - 2020-01-25

(2020-01-25, 13:45)sualfred Wrote: I don't see any difference of the stored fanart path of "Bridge of Spies".
Both are having : H:\Filme\Bridge of Spies Der Unterhändler (2015)\Bridge of Spies Der Unterhändler (2015)-fanart.jpg

Weird that it works after you refreshed the item. Umlauts are no problem. Fixed that months ago.

But where does this exception came from? It's not related to the image blurring. What are you doing in this moment so I can reproduce it?

I just navigate to next movie (Bringing Out The Deead) and back again and open Info.

ONE THING I MISSED and not tested is the bahaviour when local nfo ist stored, which was the case here.

No time now to test myself to see if it's came from local nfo's.