Kodi Community Forum

Full Version: script.embuary.helper - a skin helper service / widgets alternative
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 16 17 18 19 20 21 22 23 24 25 26
Because there is a window change after you set the builtin property. This value is stored in the active window and isn't available in the next one. Set it after you activated 1122.
(2019-09-17, 22:33)sualfred Wrote: [ -> ]Because there is a window change after you set the builtin property. This value is stored in the active window and isn't available in the next one. Set it after you activated 1122.
@sualfred, I am not sure if I understand. I cannot set the skin string after activating window 1122, since that window needs the skin string to be set, ad it is the search term. Or are you referring to something different?

What I see happening is that the first action in the Dialog.Builtin is being performed (setting the skin string), but the rest are not. I can see that the skin string is set correctly, but if I look at what is the value of the Dialog.Builtin property, it is cutoff after the three question marks. Perhaps something is different in the createselect function vs the new one?

Regards,

Bart
Hi @sualfred

Would you consider adding some extra property's for the music library?

Something along the lines of this?

Artist Node
Window(home).Property(artists.albumcount)

Album Node
Window(home).Property(albums.songcount)
Window(home).Property(albums.duration)
Window(home).Property(albums.disccount)

Songs Node
Window(home).Property(songs.AudioCodec)
Window(home).Property(songs.AudioChannels)
Window(home).Property(songs.BitsRate)
Window(home).Property(songs.BitsPerSample)
Window(home).Property(songs.SampleRate)

For music and music videos
Make property "ListItem.Property(Artist_Description)" available in the album node if no album description is available
Make property "ListItem.Property(Album_Description)" available in the song node and if no album description is available use "ListItem.Property(Artist_Description)"


I have put in a feature request for kodi matrix to @DaveBlake. Not sure if it will be implemented though.
https://forum.kodi.tv/showthread.php?tid=343220

Cheers
Mr. V
@bsoriano 
What's the value of the question marks?

@Mr. V 
I'm not a fan of those listitem monitors. Slow and delayed. Album count can be achieved with a hidden container based on the focused artist and container.numitems. Same applies to the song count.
(2019-09-18, 06:13)sualfred Wrote: [ -> ]@bsoriano 
What's the value of the question marks?

@Mr. V 
I'm not a fan of those listitem monitors. Slow and delayed. Album count can be achieved with a hidden container based on the focused artist and container.numitems. Same applies to the song count.

I do have the items counts working with a hidden containers as you have said.
I thought my request might be something in the kodi database that was easily implemented. As you have said slow and delayed, i am not a fan of that either, so i will see what will happen with kodi matrix.

Thanks for your reply.
Basically I can call a lot of information, but this always requires something like a monitor to get those. Let's wait for Matrix. He is improving this section a lot so maybe some of them will be available as builtin info label soon.
(2019-09-18, 06:39)sualfred Wrote: [ -> ]Basically I can call a lot of information, but this always requires something like a monitor to get those. Let's wait for Matrix. He is improving this section a lot so maybe some of them will be available as builtin info label soon.

Makes sense. Hopefully @DaveBlake has the time to code the info labels. Otherwise will have to see what happens with kodi N****.

Cheers
(2019-09-18, 06:13)sualfred Wrote: [ -> ]@bsoriano 
What's the value of the question marks?

@Mr. V 
I'm not a fan of those listitem monitors. Slow and delayed. Album count can be achieved with a hidden container based on the focused artist and container.numitems. Same applies to the song count.

@sualfred, the three question marks are the ones you replace with the selected label from the dialog. In my test, your plugin replaced those with the genre “Thriller”. That action was done, but the Close action and the activation of Window 1122 were not done. Again, I think that the Dialog.Builtin was only filled with the first of the three actions separated by ||.

Regards,

Bart
Now I understand what you are doing. That does not work. || is the splitting identifier and your first select dialog call will split it for the next one too.

Try this one:
https://github.com/sualfred/script.embua...07f00a498a

This adds a new argument "splitby" that can be used to use another splitting identifier instead of ||.



<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,? ? ?)++Dialog.Close(all)++ActivateWindow(1122))||RunScript(script.embuary.helper,action=splitandcreateselect,header='"Select a Genre"',items='$ESCINFO[ListItem.Genre]',seperator='" / "',splitby='"++"'))</onclick>
<onclick condition="Skin.HasSetting(Enable.ExtendedInfo)">RunScript(script.embuary.helper,action=createselect,header=$LOCALIZE[137])</onclick>

(2019-09-18, 13:15)sualfred Wrote: [ -> ]Now I understand what you are doing. That does not work. || is the splitting identifier and your first select dialog call will split it for the next one too.

Try this one:
https://github.com/sualfred/script.embua...07f00a498a

This adds a new argument "splitby" that can be used to use another splitting identifier instead of ||.



<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,? ? ?)++Dialog.Close(all)++ActivateWindow(1122))||RunScript(script.embuary.helper,action=splitandcreateselect,header='"Select a Genre"',items='$ESCINFO[ListItem.Genre]',seperator='" / "',splitby='"++"'))</onclick>
<onclick condition="Skin.HasSetting(Enable.ExtendedInfo)">RunScript(script.embuary.helper,action=createselect,header=$LOCALIZE[137])</onclick>


@sualfred , thank you very much! Smile

Works great.

Regards,

Bart
@sualfred, I added what I wanted to happen for online search, but it does not work.  This is what i have for the onclicks now:


<onclick condition="Skin.HasSetting(Enable.ExtendedInfo)">SetProperty(Dialog.1.Label,$LOCALIZE[32018])</onclick>
<onclick condition="Skin.HasSetting(Enable.ExtendedInfo)">SetProperty(Dialog.1.BuiltIn,SetProperty(Dialog.Builtin,Skin.SetString(OnlineSearchTerm,Huh)++Dialog.Close(all)++ActivateWindow(1131))||RunScript(script.embuary.helper,action=splitandcreateselect,header='"Select a Genre"',items='$ESCINFO[ListItem.Genre]',seperator='" / "',splitby='"++"')))</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='" / "',splitby='"++"'))</onclick>
<onclick condition="Skin.HasSetting(Enable.ExtendedInfo)">RunScript(script.embuary.helper,action=createselect,header=$LOCALIZE[137])</onclick>

The onclick actions for the second option Dialog.2.BuiltIn get exectued just fine, but the actions for the first option do not.  I get the select dialog with the separated genres, but nothing happens when I select one.  If I look at what is in the skin string OnlineSearchTerm, it is not the selected label from the dialog, but something like this: 

Romance)++Dialog.Close(all)++ActivateWindow(1131

Note: The three question marks are there after OnlineSearchTerm and CustomSearchTerm, even if not shown in the syntax block.

If I put the same combination of actions that are not working for the first option (Dialog.1.BuiltIn), in the second option (Dialog.2.BuiltIn), they work just fine.

Please let me know if there is something I need to do differently.  Thanks.

Regards,

Bart
Please let me know the value that is going to be filled to ? ? ? for both items so I can reproduce it locally. Plus the ListItem.Genre value.
(2019-09-18, 17:26)sualfred Wrote: [ -> ]Please let me know the value that is going to be filled to ? ? ? for both items so I can reproduce it locally. Plus the ListItem.Genre value.

@sualfred , the ListItem.Genre value is Comedy / Romance / War.  The value I selected, which should fill the ?  ? ? is Romance.

Regards,

Bart
your first action has a ")" too much at the end.
(2019-09-18, 17:41)sualfred Wrote: [ -> ]your first action has a ")" too much at the end.
@sualfred, thank you and my apologies! That is a silly mistake.

Regards,

Bart
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