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
Try the latest GitHub commit.
I've added an optional  ",window=" parameter where you can set the window that you want to use.


                                    <onclick>SetProperty(Dialog.1.Label,label1 1,home)</onclick>
                                    <onclick>SetProperty(Dialog.1.Label2,testlabel2 1,home)</onclick>
                                    <onclick>SetProperty(Dialog.2.Label,label1 2,home)</onclick>
                                    <onclick>SetProperty(Dialog.2.Label2,testlabel2 2,home)</onclick>
Great. All working fine. Now i can start some serious replacing.

Thanks a lot for this man and for your patience in all my questions & requests Angel

I can't promise you that this is the last time Tongue

No prob. Suggestions are always welcome.
Hey sualfred... if it's not too much trouble for you i have one last request about the selection function.

In some cases i use the select dialog to set a skinstring but in a fresh settings start a default selection it's needed to be set.

Is it possible to add another argument in the script call where the default selection can be set?.... ,default=foo


added on GitHub -> "preselect"
It sets the default index position and marks the listitem as selected (ListItem.IsSelected). 
The index value starts with 0. If you use "-1" it will disable the preselection (which is the default if argument is not provided).

Sorry, man but this is not working as i expected. I think it's my fault that i didn't explain it correctly.

I don't need a pre-selected item when the dialog is open or to be marked as ListItem.IsSelected, although will be a good addition. I want (and i think whoever uses this in the same case scenarios)... in a fresh skin settings start, when there is no selection at all since the selection dialog it's not even opened yet, the script to set a default selection (eg a skinstring), so i don't need to add more code in home window to set those defaults strings in case Kodi starts fresh.

Is that possible?

By the way with your last commit even the ListItem.IsSelected it's not working properly. Whatever item i select, still focus and mark goes to the item that is set as ,preselect=foo

Not really. I work with variables and with a init setup that I also use to provide a skin resetting button https://github.com/sualfred/skin.embuary..._Reset.xml
I know that Marcel had a "skinsettings" feature implemented, but I always found it too complicated and it did not saved me any time in coding. I have currently no plans to implement something like this.

For me the preselect works fine.


                                    <onclick>SetProperty(Dialog.1.Label,label1 1,home)</onclick>
                                    <onclick>SetProperty(Dialog.1.Label2,label2 1,home)</onclick>
                                    <onclick>SetProperty(Dialog.2.Label,label1 2,home)</onclick>
                                    <onclick>SetProperty(Dialog.2.Label2,label2 2,home)</onclick>

preselect=0 -> First item gehts selected
preselect=1 -> Second item gehts selected
preselect=2 -> Third item gehts selected
preseletct -1 -> Nothing gets selected

You have to built a variable and use that for preselect index if it was changed once.


<variable name="preselect">
<value condition="String.IsEqual(Skin.String(Default),1)">1</value>
Well, we have a different approach on this. Always when i code i have in my mind to do as much as possible with a less code as possible. I don't like to throw around variables, includes etc for every little thing. I don't know from python side but, in skin code, Marcel's way it needs one single line of code instead of all these. But you know better and it's your work and your approach and i fully respect that. I am happy with what i got so far.

Again, thank you very much for your work and your help.

I've used it before $PARAM's, which offered me a lot of more options. All of my skin settings in Embuary are built with 5-10 $PARAM templates. But everyone has own requirements. Maybe I'll add something like this in the future.

First dirty and ugly alpha with basics for movies,tvshows,episodes,artists,albums,songs,musicvideos:


or via context menu -> 'Manage...' --> 'Metadata editor'

Video items have .nfo updating but audio items not (lack of path information from JSON)

It would be helpful if you play a little bit with all scenarios, elements and library variants.

List/array items are splitted by ";" like you would add an additional email in mail clients.


This is way too much more than i expected!!!.

Tested and works fine. Either from context menu or from script call.

Remarks & suggestions:
- Any information added/edited are placed in the end of the .nfo file (don't know if this important when scraping items)
- The updated .nfo file is converting to UNIX format (again i don't know if this matters for all other systems besides windows)
- I use MediaElch MediaManager for my .nfo files and i have set it to create also movie.nfo files for each movie. Is it possible to update also these with the script?.
- IMHO icons are to much. I understand that you are using the detailed list of select dialog but if is possible to remove them the list will look cleaner.
- When you finish editing an item going back takes to the top of the list again. This kinda downside since it's a list of more than 20 items and you have to go again in the next item after the one you edited.

That's it. All these are much more of minor details. The script it's working perfectly fine and like i said its more than i expected. If i found any bugs will report back.

Thanks a lot man. Excellent work as always.

-> nfo order is not important
-> UNIX format is not important, that's what xbmcvfs is doing (Kodi core module)
-> I could add a setting for a custom additional .nfo file
-> I use icons as identifier what type of element it is (string, date, float, integer), but the icons are just temporary and will be replaced with nicer ones.
-> I rerun the script from the beginning to fetch the updated data. I can use the preselect method I guess.

movie.nfo support + preselection is added
All working good. No issues found.
You are good to go for the official repo Tongue.... just kidding!

A bonus feature on this it could be... an option to update (from IMDB site) the IMDB ratings or votes Wink

In any case, awesome job man in a very short time!!!

Still stuff missing that I want to add or to simplify for non experienced users.

IMDb updating is on the list.
(2019-11-03, 13:30)sualfred Wrote: [ -> ]IMDb updating is on the list.
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