value used in .xml is not accepted as argument.
#1
Hi,
In the skin xml there is a certain value that is used .
I want to send it as argument with Runscript, but i keep having only sys.argv[0]

xml:
<label>$INFO[Container(10051).ListItem.Label]</label>
and i add:
xml:
<onclick>RunScript(script.tmdb.downloader, $INFO[Container(10051).ListItem.Label])</onclick>
i try to put into "", without success.

What's wrong with that ?
Debian trixie  -  Kodi 20.4  -  Embuary skin  -  FireTV Stick
pycharm  &  kodistubs
Reply
#2
Hi,

I think you need to use the name of your parameter, e.g. :
Code:
<onclick>RunScript(script.tmdb.downloader,myparam=$INFO[Container(10051).ListItem.Label])</onclick>
Reply
#3
thanks, but i already try that one . Confused

xml:
<onclick>RunScript(script.tmdb.downloader, "test")</onclick>
<onclick>RunScript(script.tmdb.downloader  "test")</onclick>
<onclick>RunScript(script.tmdb.downloader, test="test")</onclick>

in anyways , i got len(sys.argv) == 1 ,
so in fact the
Code:
$INFO[Container(10051).ListItem.Label] , "$INFO[Container(10051).ListItem.Label]" or param="$INFO[Container(10051).ListItem.Label]" or param=$INFO[Container(10051).ListItem.Label]
is not the problem, there is something else higher.
Here is the addon.xml
xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.tmdb.downloader" name="TMDB-Downloader" version="1.0.0" provider-name="dehya">
  <requires>
    <import addon="xbmc.python" version="3.0.0"/>
  </requires>
  <extension point="xbmc.python.script" library="main.py">
    <provides>executable</provides>
  </extension>
       
<!-- <extension point="xbmc.python.script" library="main.py">-->
<!-- <extension point="xbmc.python.library" library="resources/test.py">-->
<!-- <provides>executable</provides>--> <!-- </extension>-->

.... addon metadata....

</addon>
Debian trixie  -  Kodi 20.4  -  Embuary skin  -  FireTV Stick
pycharm  &  kodistubs
Reply
#4
Hi,
May be the problem is from your python code.
I don't think this a skinning problem, you should post your problem in the Addons development section.
Reply
#5
Thread moved.
Reply
#6
Maybe,

For one time, pretty sure it don't come from python code, as it start with:
python:
...
import xbmcaddon
import xbmcgui
import sys
import xbmc
from time import sleep

xbmc.log("TMDB-DOWNLOADER: Number of arguments: " + str(len(sys.argv)), xbmc.LOGINFO)

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

Logout Mark Read Team Forum Stats Members Help
value used in .xml is not accepted as argument.0