Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

changed: get rid of the content types added earlier, favouring extens…

…ion points for the specific python scripts, and update Confluence to use skin.setaddon

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30520 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
commit 35cf15f2a3dfa82d29d75d81b9434de011a35226 1 parent fa54950
jmarshallnz authored
6 addons/skin.confluence/720p/custom_SkinSetting_1111.xml
View
@@ -1674,7 +1674,7 @@
<focusedcolor>white</focusedcolor>
<texturefocus>MenuItemFO.png</texturefocus>
<texturenofocus>MenuItemNF.png</texturenofocus>
- <onclick>Skin.SetFile(WeatherScript_Path,Script)</onclick>
+ <onclick>Skin.SetAddon(WeatherScript_Path,xbmc.python.weather)</onclick>
<visible>Skin.HasSetting(WeatherScript_Enable)</visible>
</control>
@@ -1711,7 +1711,7 @@
<focusedcolor>white</focusedcolor>
<texturefocus>MenuItemFO.png</texturefocus>
<texturenofocus>MenuItemNF.png</texturenofocus>
- <onclick>Skin.SetFile(LyricScript_Path,Script)</onclick>
+ <onclick>Skin.SetAddon(LyricScript_Path,xbmc.python.lyrics)</onclick>
<visible>Skin.HasSetting(LyricScript_Enable)</visible>
</control>
@@ -1748,7 +1748,7 @@
<focusedcolor>white</focusedcolor>
<texturefocus>MenuItemFO.png</texturefocus>
<texturenofocus>MenuItemNF.png</texturenofocus>
- <onclick>Skin.SetFile(SubtitleScript_Path,Script)</onclick>
+ <onclick>Skin.SetAddon(SubtitleScript_Path,xbmc.python.subtitles)</onclick>
<visible>Skin.HasSetting(SubtitleDownload_Enable)</visible>
</control>
</control>
4 addons/xbmc.python/addon.xml
View
@@ -4,4 +4,8 @@
<import addon="xbmc.core" version="0.1"/>
</requires>
<extension-point id="script" schema="script.xsd"/>
+ <extension-point id="subtitles" schema="script.xsd"/>
+ <extension-point id="lyrics" schema="script.xsd"/>
+ <extension-point id="weather" schema="script.xsd"/>
+ <extension-point id="library" schema="script.xsd"/>
</addon>
2  xbmc/GUIWindowSettingsCategory.cpp
View
@@ -2786,7 +2786,7 @@ void CGUIWindowSettingsCategory::FillInWeatherScripts(CGUISpinControlEx *pContro
pControl->AddLabel(g_localizeStrings.Get(24028), j++);
//find weather scripts....
- CAddonMgr::Get().GetAddons(ADDON_SCRIPT, addons, CONTENT_WEATHER);
+ CAddonMgr::Get().GetAddons(ADDON_SCRIPT_WEATHER, addons);
if (!addons.empty())
{
for (unsigned int i = 0; i < addons.size(); i++)
18 xbmc/addons/Addon.cpp
View
@@ -64,11 +64,7 @@ static const ContentMapping content[] =
{"audio", CONTENT_AUDIO, 0 },
{"image", CONTENT_IMAGE, 0 },
{"program", CONTENT_PROGRAM, 0 },
- {"video", CONTENT_VIDEO, 0 },
- {"weather", CONTENT_WEATHER, 0 },
- {"subtitles", CONTENT_SUBTITLES, 0 },
- {"lyrics", CONTENT_LYRICS, 0 },
- {"recentlyadded", CONTENT_RECENTLY_ADDED, 0 }};
+ {"video", CONTENT_VIDEO, 0 }};
typedef struct
{
@@ -86,6 +82,10 @@ static const TypeMapping types[] =
{"visualization-library", ADDON_VIZ_LIBRARY, 0 },
{"plugin", ADDON_PLUGIN, 24005 },
{"xbmc.python.script", ADDON_SCRIPT, 24009 },
+ {"xbmc.python.weather", ADDON_SCRIPT_WEATHER, 24009 },
+ {"xbmc.python.subtitles", ADDON_SCRIPT_SUBTITLES, 24009 },
+ {"xbmc.python.lyrics", ADDON_SCRIPT_LYRICS, 24009 },
+ {"xbmc.python.library", ADDON_SCRIPT_LIBRARY, 24009 },
{"xbmc.gui.skin", ADDON_SKIN, 166 },
{"xbmc.addon.repository", ADDON_REPOSITORY, 24011 },
{"pvrclient", ADDON_PVRDLL, 0 }};
@@ -290,6 +290,10 @@ void CAddon::BuildLibName(cp_plugin_info_t *props)
ext = ADDON_VIS_EXT;
break;
case ADDON_SCRIPT:
+ case ADDON_SCRIPT_LIBRARY:
+ case ADDON_SCRIPT_LYRICS:
+ case ADDON_SCRIPT_WEATHER:
+ case ADDON_SCRIPT_SUBTITLES:
case ADDON_PLUGIN:
ext = ADDON_PYTHON_EXT;
break;
@@ -308,6 +312,10 @@ void CAddon::BuildLibName(cp_plugin_info_t *props)
{
case ADDON_SCREENSAVER:
case ADDON_SCRIPT:
+ case ADDON_SCRIPT_LIBRARY:
+ case ADDON_SCRIPT_LYRICS:
+ case ADDON_SCRIPT_WEATHER:
+ case ADDON_SCRIPT_SUBTITLES:
case ADDON_SCRAPER:
case ADDON_SCRAPER_LIBRARY:
{
8 xbmc/addons/AddonManager.cpp
View
@@ -77,6 +77,10 @@ AddonPtr CAddonMgr::Factory(const cp_extension_t *props)
{
case ADDON_PLUGIN:
case ADDON_SCRIPT:
+ case ADDON_SCRIPT_LIBRARY:
+ case ADDON_SCRIPT_LYRICS:
+ case ADDON_SCRIPT_WEATHER:
+ case ADDON_SCRIPT_SUBTITLES:
return AddonPtr(new CAddon(props->plugin));
case ADDON_SCRAPER:
return AddonPtr(new CScraper(props->plugin));
@@ -420,6 +424,10 @@ AddonPtr CAddonMgr::AddonFromProps(AddonProps& addonProps)
{
case ADDON_PLUGIN:
case ADDON_SCRIPT:
+ case ADDON_SCRIPT_LIBRARY:
+ case ADDON_SCRIPT_LYRICS:
+ case ADDON_SCRIPT_WEATHER:
+ case ADDON_SCRIPT_SUBTITLES:
return AddonPtr(new CAddon(addonProps));
case ADDON_SCRAPER:
return AddonPtr(new CScraper(addonProps));
12 xbmc/addons/IAddon.h
View
@@ -38,11 +38,7 @@ typedef enum
CONTENT_AUDIO,
CONTENT_IMAGE,
CONTENT_PROGRAM,
- CONTENT_VIDEO,
- CONTENT_SUBTITLES,
- CONTENT_WEATHER,
- CONTENT_LYRICS,
- CONTENT_RECENTLY_ADDED
+ CONTENT_VIDEO
} CONTENT_TYPE;
namespace ADDON
@@ -54,12 +50,16 @@ namespace ADDON
ADDON_SKIN,
ADDON_PVRDLL,
ADDON_SCRIPT,
+ ADDON_SCRIPT_WEATHER,
+ ADDON_SCRIPT_SUBTITLES,
+ ADDON_SCRIPT_LYRICS,
ADDON_SCRAPER,
ADDON_SCREENSAVER,
ADDON_PLUGIN,
ADDON_REPOSITORY,
ADDON_VIZ_LIBRARY, // add noninstallable after this and installable before
- ADDON_SCRAPER_LIBRARY
+ ADDON_SCRAPER_LIBRARY,
+ ADDON_SCRIPT_LIBRARY
} TYPE;
class IAddon;
Please sign in to comment.
Something went wrong with that request. Please try again.