2022-08-07, 17:44
Hello to all!
I need some help to get something to work, if possible:
I have this button on skin to run a script:
This button is executaded by a context menu on PICTURES Window:
As you can see, right above the image of the man with a hat, there a path: "D:\Wallpapers\Music Genre\". This path is the $INFO[ListItem.Path].
This is the script:
Is there a way to set the local variable as "$INFO[ListItem.Path]" ?
OBS: The script work if I set "local" to a fixed local, like: local = 'D:\Wallpapers\Music Genre\'. But, I want to be dinamic with the path on kodi.
Thanks in Advance!
I need some help to get something to work, if possible:
I have this button on skin to run a script:
Code:
<control type="button" id="1032">
<include>DialogSettingButton</include>
<onclick>RunScript(special://skin/extras/script/make_album.py</onclick>
<label>Albuns</label>
<align>center</align>
</control>
This button is executaded by a context menu on PICTURES Window:
As you can see, right above the image of the man with a hat, there a path: "D:\Wallpapers\Music Genre\". This path is the $INFO[ListItem.Path].
This is the script:
Code:
import xbmc
import xbmcgui
local = "I need to put $INFO[ListItem.Path] here"
with open(local + 'readme.album', 'w') as f:
f.write('this is a album file!')
xbmcgui.Dialog().notification('Kodi', 'Album Created', xbmcgui.NOTIFICATION_WARNING, 5)
Is there a way to set the local variable as "$INFO[ListItem.Path]" ?
OBS: The script work if I set "local" to a fixed local, like: local = 'D:\Wallpapers\Music Genre\'. But, I want to be dinamic with the path on kodi.
Thanks in Advance!