aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-05-21 05:58:51 +0000
committerjmarshallnz <jmarshallnz@svn>2010-05-21 05:58:51 +0000
commit79ac8abf90bc871da5789bf15f6beb1466540e01 (patch)
treeec4e2eab6b88596de3b8452bf55ffa2f1f796805
parent41b31663a47f35a0658ee22f3f1bf855a166241c (diff)
changed: Move scripts to cpluff
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30368 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r--addons/xbmc.python/addon.xml7
-rw-r--r--addons/xbmc.python/script.xsd17
-rw-r--r--xbmc/GUIWindowScripts.cpp2
-rw-r--r--xbmc/addons/Addon.cpp5
-rw-r--r--xbmc/addons/AddonManager.cpp5
5 files changed, 31 insertions, 5 deletions
diff --git a/addons/xbmc.python/addon.xml b/addons/xbmc.python/addon.xml
new file mode 100644
index 0000000000..5fd410f0e9
--- /dev/null
+++ b/addons/xbmc.python/addon.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<addon id="xbmc.python" version="1.0" provider-name="Team XBMC">
+ <requires>
+ <import addon="xbmc.core" version="0.1"/>
+ </requires>
+ <extension-point id="script" schema="script.xsd"/>
+</addon>
diff --git a/addons/xbmc.python/script.xsd b/addons/xbmc.python/script.xsd
new file mode 100644
index 0000000000..76bb96dce5
--- /dev/null
+++ b/addons/xbmc.python/script.xsd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="extension">
+ <xs:complexType>
+ <xs:attribute name="point" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="simpleIdentifier"/>
+ <xs:attribute name="name" type="xs:string"/>
+ <xs:attribute name="library" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:simpleType name="simpleIdentifier">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[^.]+"/>
+ </xs:restriction>
+ </xs:simpleType>
+</xs:schema>
diff --git a/xbmc/GUIWindowScripts.cpp b/xbmc/GUIWindowScripts.cpp
index 9257b24b92..135d84bc21 100644
--- a/xbmc/GUIWindowScripts.cpp
+++ b/xbmc/GUIWindowScripts.cpp
@@ -215,7 +215,7 @@ bool CGUIWindowScripts::GetDirectory(const CStdString& strDirectory, CFileItemLi
for (unsigned i=0; i < addons.size(); i++)
{
AddonPtr addon = addons[i];
- CFileItemPtr pItem(new CFileItem(addon->Path()+addon->LibName(),false));
+ CFileItemPtr pItem(new CFileItem(CUtil::AddFileToFolder(addon->Path(),addon->LibName()),false));
pItem->SetLabel(addon->Name());
pItem->SetLabel2(addon->Summary());
pItem->SetThumbnailImage(addon->Icon());
diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp
index c565c5d90b..136290e8dd 100644
--- a/xbmc/addons/Addon.cpp
+++ b/xbmc/addons/Addon.cpp
@@ -135,7 +135,7 @@ const CStdString TranslateType(const ADDON::TYPE &type, bool pretty/*=false*/)
{
if (pretty)
return g_localizeStrings.Get(24009);
- return "script";
+ return "xbmc.python.script";
}
case ADDON::ADDON_SKIN:
{
@@ -169,7 +169,7 @@ const ADDON::TYPE TranslateType(const CStdString &string)
else if (string.Equals("xbmc.player.musicviz")) return ADDON_VIZ;
else if (string.Equals("visualization-library")) return ADDON_VIZ_LIBRARY;
else if (string.Equals("plugin")) return ADDON_PLUGIN;
- else if (string.Equals("script")) return ADDON_SCRIPT;
+ else if (string.Equals("xbmc.python.script")) return ADDON_SCRIPT;
else if (string.Equals("xbmc.gui.skin")) return ADDON_SKIN;
else if (string.Equals("script-library")) return ADDON_SCRIPT_LIBRARY;
else if (string.Equals("xbmc.addon.repository")) return ADDON_REPOSITORY;
@@ -339,6 +339,7 @@ void CAddon::BuildLibName(cp_plugin_info_t *props)
switch (m_props.type)
{
case ADDON_SCREENSAVER:
+ case ADDON_SCRIPT:
{
CStdString temp = CAddonMgr::Get().GetExtValue(props->extensions->configuration, "@library");
m_strLibName = temp;
diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp
index 312dfa5c45..bdec0c33dc 100644
--- a/xbmc/addons/AddonManager.cpp
+++ b/xbmc/addons/AddonManager.cpp
@@ -253,7 +253,7 @@ void CAddonMgr::DeInit()
bool CAddonMgr::HasAddons(const TYPE &type, const CONTENT_TYPE &content/*= CONTENT_NONE*/, bool enabledOnly/*= true*/)
{
- if (type == ADDON_SCREENSAVER || type == ADDON_SKIN || type == ADDON_VIZ)
+ if (type == ADDON_SCREENSAVER || type == ADDON_SKIN || type == ADDON_VIZ || type == ADDON_SCRIPT || type == ADDON_REPOSITORY)
{
cp_status_t status;
int num;
@@ -300,7 +300,7 @@ bool CAddonMgr::GetAddons(const TYPE &type, VECADDONS &addons, const CONTENT_TYP
{
CSingleLock lock(m_critSection);
addons.clear();
- if (type == ADDON_SCREENSAVER || type == ADDON_SKIN || type == ADDON_VIZ || type == ADDON_REPOSITORY)
+ if (type == ADDON_SCREENSAVER || type == ADDON_SKIN || type == ADDON_VIZ || type == ADDON_REPOSITORY || type == ADDON_SCRIPT)
{
cp_status_t status;
int num;
@@ -342,6 +342,7 @@ bool CAddonMgr::GetAddon(const CStdString &str, AddonPtr &addon, const TYPE &typ
&& type != ADDON_SKIN
&& type != ADDON_VIZ
&& type != ADDON_REPOSITORY
+ && type != ADDON_SCRIPT
&& m_addons.find(type) == m_addons.end())
return false;