diff options
author | jmarshallnz <jcmarsha@gmail.com> | 2014-04-25 21:47:20 +1200 |
---|---|---|
committer | Jonathan Marshall <jmarshall@xbmc.org> | 2014-04-26 09:05:24 +1200 |
commit | 39396856395abe1d467ce157a11093a56c5c871c (patch) | |
tree | 887927341e5ec88434635e5dc15cc34b8d5d855c | |
parent | 58c4436cdb8b67db236eb9730d6834b15370a2cf (diff) |
Merge pull request #4598 from jmarshallnz/plugins_run_as_plugins
[plugins] ensure we lookup the add-on as a plugin before trying any other extension point
-rw-r--r-- | xbmc/filesystem/PluginDirectory.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xbmc/filesystem/PluginDirectory.cpp b/xbmc/filesystem/PluginDirectory.cpp index 50dd45a176..bf9ca34db7 100644 --- a/xbmc/filesystem/PluginDirectory.cpp +++ b/xbmc/filesystem/PluginDirectory.cpp @@ -90,7 +90,9 @@ bool CPluginDirectory::StartScript(const CStdString& strPath, bool retrievingDir { CURL url(strPath); - if (!CAddonMgr::Get().GetAddon(url.GetHostName(), m_addon, ADDON_UNKNOWN) && + // try the plugin type first, and if not found, try an unknown type + if (!CAddonMgr::Get().GetAddon(url.GetHostName(), m_addon, ADDON_PLUGIN) && + !CAddonMgr::Get().GetAddon(url.GetHostName(), m_addon, ADDON_UNKNOWN) && !CAddonInstaller::Get().PromptForInstall(url.GetHostName(), m_addon)) { CLog::Log(LOGERROR, "Unable to find plugin %s", url.GetHostName().c_str()); |