2016-11-29, 07:47
The section of code you are concerned with:
We don't need that code at all.
Use this instead:
Your youtube add-on will run fine.
Hope that helps.
As far as Addon.id, not sure as I didn't write the plugintools.py. I think with some code examination, what we want to use for creating simple youtube add-ons, the small portion of pertinent code from plugintools.py could probably be extracted and added directly into the main default.py. I haven't dug into the code to see what small portions are used, but it should not be too hard to figure out.
Code:
def run():
plugintools.log("fullycharged.run")
# Get params
params = plugintools.get_params()
if params.get("action") is None:
main_list(params)
else:
action = params.get("action")
exec action+"(params)" <<<---- this line of code with exec
plugintools.close_item_list()
We don't need that code at all.
Use this instead:
Code:
def run():
plugintools.log("fullycharged.run")
# Get params
params = plugintools.get_params()
if params.get("action") is None:
main_list(params)
else:
pass
plugintools.close_item_list()
Your youtube add-on will run fine.
Hope that helps.
As far as Addon.id, not sure as I didn't write the plugintools.py. I think with some code examination, what we want to use for creating simple youtube add-ons, the small portion of pertinent code from plugintools.py could probably be extracted and added directly into the main default.py. I haven't dug into the code to see what small portions are used, but it should not be too hard to figure out.