diff options
-rw-r--r-- | addons/metadata.tvdb.com/addon.xml | 19 | ||||
-rw-r--r-- | addons/metadata.tvdb.com/description.xml | 23 | ||||
-rw-r--r-- | addons/xbmc.metadata/addon.xml | 7 | ||||
-rw-r--r-- | addons/xbmc.metadata/scraper.xsd | 17 | ||||
-rw-r--r-- | xbmc/addons/Addon.cpp | 7 | ||||
-rw-r--r-- | xbmc/addons/AddonManager.cpp | 7 | ||||
-rw-r--r-- | xbmc/utils/ScraperParser.cpp | 2 |
7 files changed, 53 insertions, 29 deletions
diff --git a/addons/metadata.tvdb.com/addon.xml b/addons/metadata.tvdb.com/addon.xml new file mode 100644 index 0000000000..b727b09bd1 --- /dev/null +++ b/addons/metadata.tvdb.com/addon.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<addon id="metadata.tvdb.com" + name="The TVDB" + version="1.0.0" + provider-name="Team XBMC"> + <requires> + <import addon="xbmc.metadata" version="1.0"/> + </requires> + <extension point="xbmc.metadata.scraper" + library="tvdb.xml"/> + <extension point="xbmc.addon.metadata"> + <platform>all</platform> + <minversion>20000</minversion> + <summary>TV show scraper</summary> + <description>TheTVDB.com is a TV Scraper. The site is a massive open database that can be modified by anybody and contains full meta data for many shows in different languages. All content and images on the site have been contributed by their users for users and have a high standard or quality. The database schema and website are open source under the GPL</description> + <description lang="nl">TheTVDB.com is een TV-show Scraper. De site is een gigantische open databank die door iedereen kan aangepast en uitgebreid worden. Het bevat informatie voor vele TV-shows in verschillende talen. Alle inhoud en afbeeldingen zijn bijgedragen door en voor gebruikers met een hoge kwaliteitsnorm. Het databank schema en de website zijn vrijgegeven onder de open source GPL licentie.</description> + <content>tvshows</content> + </extension> +</addon> diff --git a/addons/metadata.tvdb.com/description.xml b/addons/metadata.tvdb.com/description.xml deleted file mode 100644 index 7db041fb9c..0000000000 --- a/addons/metadata.tvdb.com/description.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<addoninfo> - <id>metadata.tvdb.com</id> - <type>scraper</type> - <title>TVDB</title> - <library>tvdb.xml</library> - <version>1.0.0</version> - <platforms> - <platform>all</platform> - </platforms> - <minversion> - <xbmc>20000</xbmc> - </minversion> - <summary>TV show scraper</summary> - <description>TheTVDB.com is a TV Scraper. The site is a massive open database that can be modified by anybody and contains full meta data for many shows in different languages. All content and images on the site have been contributed by their users for users and have a high standard or quality. The database schema and website are open source under the GPL</description> - <description lang="nl">TheTVDB.com is een TV-show Scraper. De site is een gigantische open databank die door iedereen kan aangepast en uitgebreid worden. Het bevat informatie voor vele TV-shows in verschillende talen. Alle inhoud en afbeeldingen zijn bijgedragen door en voor gebruikers met een hoge kwaliteitsnorm. Het databank schema en de website zijn vrijgegeven onder de open source GPL licentie.</description> - <author>Team XBMC</author> - <dependencies> - </dependencies> - <supportedcontent> - <content>tvshows</content> - </supportedcontent> -</addoninfo> diff --git a/addons/xbmc.metadata/addon.xml b/addons/xbmc.metadata/addon.xml new file mode 100644 index 0000000000..a9ea02511e --- /dev/null +++ b/addons/xbmc.metadata/addon.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<addon id="xbmc.metadata" version="1.0" provider-name="Team XBMC"> + <requires> + <import addon="xbmc.core" version="0.1"/> + </requires> + <extension-point id="scraper" schema="scraper.xsd"/> +</addon> diff --git a/addons/xbmc.metadata/scraper.xsd b/addons/xbmc.metadata/scraper.xsd new file mode 100644 index 0000000000..76bb96dce5 --- /dev/null +++ b/addons/xbmc.metadata/scraper.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/addons/Addon.cpp b/xbmc/addons/Addon.cpp index b14ca8f380..b851daf57f 100644 --- a/xbmc/addons/Addon.cpp +++ b/xbmc/addons/Addon.cpp @@ -103,7 +103,7 @@ const CStdString TranslateType(const ADDON::TYPE &type, bool pretty/*=false*/) { if (pretty) return g_localizeStrings.Get(24007); - return "scraper"; + return "xbmc.metadata.scraper"; } case ADDON::ADDON_SCRAPER_LIBRARY: { @@ -163,7 +163,7 @@ const CStdString TranslateType(const ADDON::TYPE &type, bool pretty/*=false*/) const ADDON::TYPE TranslateType(const CStdString &string) { if (string.Equals("pvrclient")) return ADDON_PVRDLL; - else if (string.Equals("scraper")) return ADDON_SCRAPER; + else if (string.Equals("xbmc.metadata.scraper")) return ADDON_SCRAPER; else if (string.Equals("scraper-library")) return ADDON_SCRAPER_LIBRARY; else if (string.Equals("xbmc.ui.screensaver")) return ADDON_SCREENSAVER; else if (string.Equals("xbmc.player.musicviz")) return ADDON_VIZ; @@ -237,6 +237,8 @@ AddonProps::AddonProps(cp_plugin_info_t *props) description = CAddonMgr::Get().GetTranslatedString(metadata->configuration, "description"); disclaimer = CAddonMgr::Get().GetTranslatedString(metadata->configuration, "disclaimer"); license = CAddonMgr::Get().GetExtValue(metadata->configuration, "license"); + // FIXME this needs to grab all siblings... + contents.insert(TranslateContent(CAddonMgr::Get().GetExtValue(metadata->configuration, "content"))); //FIXME other stuff goes here //CStdString version = CAddonMgr::Get().GetExtValue(metadata->configuration, "minversion/xbmc"); } @@ -340,6 +342,7 @@ void CAddon::BuildLibName(cp_plugin_info_t *props) { case ADDON_SCREENSAVER: case ADDON_SCRIPT: + case ADDON_SCRAPER: { 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 bdec0c33dc..b67f6ee108 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 || type == ADDON_SCRIPT || type == ADDON_REPOSITORY) + if (type == ADDON_SCREENSAVER || type == ADDON_SKIN || type == ADDON_VIZ || type == ADDON_SCRIPT || type == ADDON_REPOSITORY || type == ADDON_SCRAPER) { 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 || type == ADDON_SCRIPT) + if (type == ADDON_SCREENSAVER || type == ADDON_SKIN || type == ADDON_VIZ || type == ADDON_REPOSITORY || type == ADDON_SCRIPT || type == ADDON_SCRAPER) { cp_status_t status; int num; @@ -309,7 +309,7 @@ bool CAddonMgr::GetAddons(const TYPE &type, VECADDONS &addons, const CONTENT_TYP for(int i=0; i <num; i++) { AddonPtr addon(Factory(exts[i])); - if (addon) + if (addon && (content == CONTENT_NONE || addon->Supports(content))) addons.push_back(addon); } m_cpluff->release_info(m_cp_context, exts); @@ -343,6 +343,7 @@ bool CAddonMgr::GetAddon(const CStdString &str, AddonPtr &addon, const TYPE &typ && type != ADDON_VIZ && type != ADDON_REPOSITORY && type != ADDON_SCRIPT + && type != ADDON_SCRAPER && m_addons.find(type) == m_addons.end()) return false; diff --git a/xbmc/utils/ScraperParser.cpp b/xbmc/utils/ScraperParser.cpp index fccd485875..68ec3c3725 100644 --- a/xbmc/utils/ScraperParser.cpp +++ b/xbmc/utils/ScraperParser.cpp @@ -115,7 +115,7 @@ bool CScraperParser::Load(const AddonPtr& scraper) m_scraper = scraper; - return Load(m_scraper->Path() + m_scraper->LibName()); + return Load(CUtil::AddFileToFolder(m_scraper->Path(),m_scraper->LibName())); } bool CScraperParser::LoadFromXML() |