aboutsummaryrefslogtreecommitdiff
path: root/xbmc/filesystem/PluginDirectory.cpp
diff options
context:
space:
mode:
authorJim Carroll <thecarrolls@jiminger.com>2011-04-10 17:17:03 -0400
committerJim Carroll <thecarrolls@jiminger.com>2011-04-14 10:04:46 -0400
commitf275c4a8341a4c49833cbcf244f602f59e2ff904 (patch)
tree6830ea21524ce3686c70d511a3911ed30c75f05a /xbmc/filesystem/PluginDirectory.cpp
parent492687b4cdf0994dbe02241fa3d86fb5fcf381a6 (diff)
Added the ability for a python script to instantiate an Addon instance without the need to pass an addon id. The default behavior is now to obtain the addon id from the Addon::ID method which is passed through python via the global dictionary. The ability to provide an id still exists if the Addon being instantiated is different from the one that's running.
Diffstat (limited to 'xbmc/filesystem/PluginDirectory.cpp')
-rw-r--r--xbmc/filesystem/PluginDirectory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/xbmc/filesystem/PluginDirectory.cpp b/xbmc/filesystem/PluginDirectory.cpp
index 0dd8d2e7fc..9638b1adad 100644
--- a/xbmc/filesystem/PluginDirectory.cpp
+++ b/xbmc/filesystem/PluginDirectory.cpp
@@ -117,7 +117,7 @@ bool CPluginDirectory::StartScript(const CStdString& strPath, bool retrievingDir
bool success = false;
#ifdef HAS_PYTHON
CStdString file = m_addon->LibPath();
- if (g_pythonParser.evalFile(file, argv) >= 0)
+ if (g_pythonParser.evalFile(file, argv,m_addon->ID().c_str()) >= 0)
{ // wait for our script to finish
CStdString scriptName = m_addon->Name();
success = WaitOnScriptResult(file, scriptName, retrievingDir);
@@ -434,7 +434,7 @@ bool CPluginDirectory::RunScriptWithParams(const CStdString& strPath)
// run the script
#ifdef HAS_PYTHON
CLog::Log(LOGDEBUG, "%s - calling plugin %s('%s','%s','%s')", __FUNCTION__, addon->Name().c_str(), argv[0].c_str(), argv[1].c_str(), argv[2].c_str());
- if (g_pythonParser.evalFile(addon->LibPath(), argv) >= 0)
+ if (g_pythonParser.evalFile(addon->LibPath(), argv,addon->ID().c_str()) >= 0)
return true;
else
#endif