[Unity] Advice for creating a button and window that launch script.
#1
Hi everyone, home i post on the right category.
I'm planing to customize my Kodi. I use Unity appearance:
3 things:
- I want to customize the "TMDB embuary info" extension. I want to add a button in the window that show films and series detaill (Next i will do the same on the realisator and actors one).
- This button needs to launch a custom python script that run on the NFS server. The script needs the info on that said window as parameters. (the scripts is almost done, and works like a charm)
- When the script launch, i want to open a pop up info window with a progress bar waiting for the script to finish. It have to be in another thread and optionally  (maybe with another button in that pop up window) show the prints that my script do. But first let's stick to the simple infinite progress bar.

That makes quite a lot for my poor python skills, but that is my path, and sure i will learn a lot on that one

If anyone can point me to a right direction to follow, some files to look at , some good tips to speed the work flow,  it will help a lot.
Debian trixie  -  Kodi 20.4  -  Embuary skin  -  FireTV Stick
pycharm  &  kodistubs
Reply
#2
Sorry , i can't edit the post. The title should be , [Unity] Advice for creating a button and window that launch script.
Debian trixie  -  Kodi 20.4  -  Embuary skin  -  FireTV Stick
pycharm  &  kodistubs
Reply
#3
Fixed.

You're still a newbie account, so edit privs (amongst other things) aren't yet active.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#4
yep i got it, thanks for the edit

I have my button <item>,  and mysuperscript.sh, but i wont go far with that.

It seems i  need to create an addon just for a <lauch bash script> that will be called by the button. Right ?

Next how would i connect my button to my addon , and where do i need to import the button ?

Sorry , i'm just figuring out how kodi works. and xml the same time

Love
Debian trixie  -  Kodi 20.4  -  Embuary skin  -  FireTV Stick
pycharm  &  kodistubs
Reply
#5
Ok  i found the place , it's in script-embuary-video.xml and script-embuary-person.xml, i didn't looked good enough

It looks like that:
xml:
<item>
    <visible>!String.IsEmpty(Container(10051).ListItem.Property(biography))</visible>
    <property name="icon">plot</property>
    <label>$LOCALIZE[21887]</label>
    <onclick>RunScript(script.embuary.info,call=textviewer,header='$ESCINFO[Container(10051).ListItem.Label]',message='$ESCINFO[Container(10051).ListItem.Property(biography)]')</onclick>
</item>

What is the label ?

I add a "download" button in the same folder as "plot".
xml:
<item>
    <visible>true</visible>
    <property name="icon">download</property>
    <label>$LOCALIZE[21887]</label>
    <onclick>RunScript(script.embuary.info,call=textviewer,header='$ESCINFO[Container(10051).ListItem.Label]',message='$ESCINFO[Container(10051).ListItem.Property(biography)]')</onclick>
</item>

Are the two first line Ok?
Do i need to create a addon of my own to launch my script, with xmbswift for example
What would look the line <onclick> ?
xml:
<onclick>Runscript(script.mysuperaddon, call=myscript.py, header=HuhHuh, message=Huh? I need the printed output of my script</onclick>

Thanks
Debian trixie  -  Kodi 20.4  -  Embuary skin  -  FireTV Stick
pycharm  &  kodistubs
Reply

Logout Mark Read Team Forum Stats Members Help
[Unity] Advice for creating a button and window that launch script.0