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 - bsoriano - 2019-09-07

(2019-09-06, 15:31)sualfred Wrote: Tested and checked the values for episodes. "tvshow.poster" is there. And it also gets correctly set. 

xml:
2019-09-06 15:28:15.207 T:40316  NOTICE: [ script.embuary.helper ] --> JSON CALL: {"params": {"sort": {"order": "descending", "method": "lastplayed"}, "filter": {"and": [{"operator": "true", "field": "inprogress", "value": ""}]}, "properties": ["title", "playcount", "season", "episode", "showtitle", "originaltitle", "plot", "votes", "file", "rating", "ratings", "userrating", "resume", "tvshowid", "firstaired", "art", "streamdetails", "runtime", "director", "writer", "cast", "dateadded", "lastplayed"]}, "jsonrpc": "2.0", "id": 1, "method": "VideoLibrary.GetEpisodes"}
2019-09-06 15:28:15.207 T:40316  NOTICE: [ script.embuary.helper ] --> JSON RESULT: {"id":1,"jsonrpc":"2.0","result":{"episodes":[{"art":{"season.banner":"image://L%3a%5cCarnival%20Row%5cseason01-banner.jpg/","season.poster":"image://L%3a%5cCarnival%20Row%5cseason01-poster.jpg/","thumb":"image://L%3a%5cCarnival%20Row%5cSeason%201%5cCarnival%20Row%20-%201x03%20-%20Kingdoms%20of%20the%20Moon-thumb.jpg/","tvshow.banner":"image://L%3a%5cCarnival%20Row%5cbanner.jpg/","tvshow.fanart":"image://L%3a%5cCarnival%20Row%5cfanart.jpg/","tvshow.poster":"image://L%3a%5cCarnival%20Row%5cposter.jpg/"},"cast":[],"dateadded":"2019-08-30 06:51:48","director":[],"episode":3,"episodeid":15468,"file":"L:\\Carnival Row\\Season 1\\Carnival Row - 1x03 - Kingdoms of the Moon.mkv","firstaired":"2019-08-30","label":"1x03. Kingdoms of the Moon","lastplayed":"2019-09-01 20:42:08","originaltitle":"","playcount":0,"plot":"Once, as a Burguish soldier, Philo was tasked with protecting a faerish mimasery. While The Pact bears down on them, Philo meets Vignette and finds love in the most unlikely of places.","rating":0.0,"ratings":{},"resume":{"position":461.0,"total":3602.0},"runtime":3602,"season":1,"showtitle":"Carnival Row","streamdetails":{"audio":[{"channels":6,"codec":"e-ac-3","language":"eng"}],"subtitle":[{"language":"eng"},{"language":"eng"},{"language":"ara"},{"language":"dan"},{"language":"deu"},{"language":"spa"},{"language":"spa"},{"language":"fin"},{"language":"fre"},{"language":"heb"},{"language":"hin"},{"language":"ind"},{"language":"ita"},{"language":"kor"},{"language":"error"},{"language":"dut"},{"language":"pol"},{"language":"por"},{"language":"rus"},{"language":"swe"},{"language":"tam"},{"language":"tel"},{"language":"tha"},{"language":"ota"},{"language":"chi"},{"language":"chi"}],"video":[{"aspect":1.7799999713897706,"codec":"h264","duration":3602,"height":1080,"language":"","stereomode":"","width":1920}]},"title":"Kingdoms of the Moon","tvshowid":58,"userrating":0,"votes":"0","writer":[]}],"limits":{"end":1,"start":0,"total":1}}}

Code:
$INFO[Container(203).ListItem.Art(tvshow.poster)] -> [KodiDevKit] 2019-09-06 15:30:23: image://L%3a%5cCarnival%20Row%5cposter.jpg/

@sualfred, I can’t figure it out. I will try installing Leia instead of Matrix in one of my machines and see if the behavior is different.

Regards,

Bart


RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2019-09-07

Please let me know the result. Basically I just query all available properties from a item and set them afterwards. Haven't look into Matrix except for a Python3 compatiblity.


RE: script.embuary.helper - a skin helper service / widgets alternative - bsoriano - 2019-09-07

(2019-09-07, 07:39)sualfred Wrote: Please let me know the result. Basically I just query all available properties from a item and set them afterwards. Haven't look into Matrix except for a Python3 compatiblity.
@sualfred , sorry it took long to test.  I wanted to re-create my whole library in a Leia 18.4 install.  The posters in Leia in my skin show up fine for the Next Up episodes widget from your plugin.  All of the art is populated for the listitems.  I have no idea what might be the issue in Matrix, since for playlist-based widgets, the artwork shows up fine.

Regards,

Bart


RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2019-09-07

Could be a Matrix issue. I stopped using Kodi versions in this early stage. Everyday another thing can break.


RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2019-09-16

FYI
I've added a new small and helpful function to GitHub:

Get image dimension and aspect ratio. 
https://github.com/sualfred/script.embuary.helper/wiki/Script:-Actions-and-helpers#image-dimension-and-aspect-ratio

I also added it to the player monitor to reduce the delay for this kind of images:
https://github.com/sualfred/script.embuary.helper/wiki/Service:-Running-tasks#player-artwork-dimension-and-aspect-ratio


RE: script.embuary.helper - a skin helper service / widgets alternative - bsoriano - 2019-09-17

@sualfred, I know you already provide a function to split infolabels such as directors, genres, etc., and you also provide a function to show a select dialog.  

I am trying to, in DialogVideoInfo, when a user clicks on a director, writer, genre or studio, and there is more than one in the info label, to show a select dialog with the separated items, so that the user can choose one of them to do a search either online in tmdb or locally in the video db.

I understand I could use the functions you already provide in the plugin, but one issue I have is that I don't know how many items are in the combined infolabel, so I am having a hard time with the select dialog, unless I limit it to a specific number of items.

Would you consider adding a function that splits the items in the info label, and shows the select dialog with the separated items? That would certainly make it a lot easier for my use case.

Of course, if you could also point me in the direction of another solution (my skinning skills are not great yet), I would also really appreciate it.

Thanks in advance for considering my request.

Regards,

Bart


RE: script.embuary.helper - a skin helper service / widgets alternative - jurialmunkey - 2019-09-17

(2019-09-17, 00:24)bsoriano Wrote: @sualfred, I know you already provide a function to split infolabels such as directors, genres, etc., and you also provide a function to show a select dialog.  

I am trying to, in DialogVideoInfo, when a user clicks on a director, writer, genre or studio, and there is more than one in the info label, to show a select dialog with the separated items, so that the user can choose one of them to do a search either online in tmdb or locally in the video db.

I understand I could use the functions you already provide in the plugin, but one issue I have is that I don't know how many items are in the combined infolabel, so I am having a hard time with the select dialog, unless I limit it to a specific number of items.

Would you consider adding a function that splits the items in the info label, and shows the select dialog with the separated items? That would certainly make it a lot easier for my use case.

Of course, if you could also point me in the direction of another solution (my skinning skills are not great yet), I would also really appreciate it.

Thanks in advance for considering my request.

Regards,

Bart
If this is for calling the detailed item in my plugin, I actually just recently added a picker function for separated items plus if multiple results returned.

See here for how to use:
https://github.com/jurialmunkey/skin.arctic.zephyr.2/blob/master/1080i/Includes_DialogVideoInfo.xml#L86


RE: script.embuary.helper - a skin helper service / widgets alternative - bsoriano - 2019-09-17

(2019-09-17, 01:51)jurialmunkey Wrote:
(2019-09-17, 00:24)bsoriano Wrote: @sualfred, I know you already provide a function to split infolabels such as directors, genres, etc., and you also provide a function to show a select dialog.  

I am trying to, in DialogVideoInfo, when a user clicks on a director, writer, genre or studio, and there is more than one in the info label, to show a select dialog with the separated items, so that the user can choose one of them to do a search either online in tmdb or locally in the video db.

I understand I could use the functions you already provide in the plugin, but one issue I have is that I don't know how many items are in the combined infolabel, so I am having a hard time with the select dialog, unless I limit it to a specific number of items.

Would you consider adding a function that splits the items in the info label, and shows the select dialog with the separated items? That would certainly make it a lot easier for my use case.

Of course, if you could also point me in the direction of another solution (my skinning skills are not great yet), I would also really appreciate it.

Thanks in advance for considering my request.

Regards,

Bart
If this is for calling the detailed item in my plugin, I actually just recently added a picker function for separated items plus if multiple results returned.

See here for how to use:
https://github.com/jurialmunkey/skin.arctic.zephyr.2/blob/master/1080i/Includes_DialogVideoInfo.xml#L86 
@jurialmunkey , thank you so much! I will give it a try right away.

Regards,

Bart


RE: script.embuary.helper - a skin helper service / widgets alternative - bsoriano - 2019-09-17

@sualfred , I will need the functionality anyway for local searches, so I hope you will consider the request.  Thank you.

Regards,

Bart


RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2019-09-17

That's no problem, but I need to know what exactly you want to do after the selection.


RE: script.embuary.helper - a skin helper service / widgets alternative - bsoriano - 2019-09-17

(2019-09-17, 16:21)sualfred Wrote: That's no problem, but I need to know what exactly you want to do after the selection.
@sualfred, the way I have envisioned it is this:

1. The user clicks on a Director, Writer, Genre or Studio (multiple items in the same info label separated by /).  
2. A select dialog opens with the separated items as choices
3. User clicks on a choice

Ideally, and I don't know if this is possible, step 4 would be to present another select dialog asking to search online in tmdb or locally

5. If search online, run plugin to search
    if search locally, open custom search window

Also, I thought that perhaps it would work better like this:

1. The user clicks on a Director, Writer, Genre or Studio (multiple items in the same info label separated by /). 
2. Show select dialog asking to search online in tmdb or locally
3. If search online, run jurialmunkey's plugin to search (already will present a select dialog with the choices and when clicking on a choice will search in tmdb) -> I have only tested this with people, don't know yet how to do it for Genre or Studio
    If search locally, run embuary helper:
       -- Present a select dialog with the items as choices
       -- User clicks on a choice
       -- Open custom search window

I don't know if either of these is possible, or which would be better.  I appreciate your help.

Regards,

Bart


RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2019-09-17

@bsoriano 

Try this one:
https://github.com/sualfred/script.embuary.helper/commit/727585c40b62ab530f913a75ed3d57aaf1dd9d2e

Example
Quote:<onclick>SetProperty(Dialog.Builtin,Notification(User selected,Huh))</onclick>
<onclick>RunScript(script.embuary.helper,action=splitandcreateselect,header='"Whatever floats your boat"',items='$ESCINFO[ListItem.Director]',seperator='" / "')</onclick>

Mutliple select actions can be added by using || as seperator.
Huh is going to be replaced with the selected label of the dialog.
Seperator is optional. Default is " / ".

Huh = ? ? ? (without spaces. F***ing board emojis)


RE: script.embuary.helper - a skin helper service / widgets alternative - bsoriano - 2019-09-17

(2019-09-17, 17:34)sualfred Wrote: @bsoriano 

Try this one:
https://github.com/sualfred/script.embuary.helper/commit/727585c40b62ab530f913a75ed3d57aaf1dd9d2e

Example
Quote:<onclick>SetProperty(Dialog.Builtin,Notification(User selected,Huh))</onclick>
<onclick>RunScript(script.embuary.helper,action=splitandcreateselect,header='"Whatever floats your boat"',items='$ESCINFO[ListItem.Director]',seperator='" / "')</onclick>

Mutliple select actions can be added by using || as seperator.
Huh is going to be replaced with the selected label of the dialog.
Seperator is optional. Default is " / ".

Huh = ? ? ? (without spaces. F***ing board emojis) 
@sualfred that was fast, thank you! Smile

So, to see if I understood well, the Dialog.Builtin property should have all of the actions that I want to perform with the selected label from the dialog, and in each one of those actions, I should put Huh to signify the label that the user chose. Is that correct?

Regards,

Bart


RE: script.embuary.helper - a skin helper service / widgets alternative - sualfred - 2019-09-17

yep


RE: script.embuary.helper - a skin helper service / widgets alternative - bsoriano - 2019-09-17

@sualfred, I tested by calling my custom search window after selecting one item, and it works great, thank you! Smile

However, when trying to accomplish my more complex scenario of showing first a select dialog to choose from searching online or locallly, and, if the user chooses to search locally then showing another select dialog with the separated items to then open up my custom search window, this does not completely work.  What I have for the onclick actions is this:

xml:

<onclick condition="Skin.HasSetting(Enable.ExtendedInfo)">SetProperty(Dialog.1.Label,$LOCALIZE[32018])</onclick>
                            <onclick condition="Skin.HasSetting(Enable.ExtendedInfo)">SetProperty(Dialog.1.BuiltIn,noop)</onclick>
                            <onclick condition="Skin.HasSetting(Enable.ExtendedInfo)">SetProperty(Dialog.2.Label,$LOCALIZE[32017])</onclick>
                            <onclick condition="Skin.HasSetting(Enable.ExtendedInfo)">SetProperty(Dialog.2.BuiltIn,SetProperty(Dialog.Builtin,Skin.SetString(CustomSearchTerm,Huh)||Dialog.Close(all)||ActivateWindow(1122))||RunScript(script.embuary.helper,action=splitandcreateselect,header='"Select a Genre"',items='$ESCINFO[ListItem.Genre]',seperator='" / "'))</onclick>
                            <onclick condition="Skin.HasSetting(Enable.ExtendedInfo)">RunScript(script.embuary.helper,action=createselect,header=$LOCALIZE[137])</onclick>

The second select dialog with the separated genres is shown, but nothing happens when I choose one.  I don't know what is going on, it seems the last Dialog.Builtin property is not being set correctly, it appears that only the first action is being set.  Could you please let me know what I am doing wrong? Thanks!

The three question marks are there after CustomSearchTerm, even if the forum does not show them in the xml syntax block.

Regards,

Bart