Skip to content
Browse files

fixed: Get weather, subtitles, lyrics and library scripts to show up …

…in the Addon Manager.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30542 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
1 parent 423cf98 commit 816cf12e7a3312cd55a31e46c2113d22eba383e0 jmarshallnz committed May 25, 2010
Showing with 15 additions and 17 deletions.
  1. +3 −0 language/English/strings.xml
  2. +4 −4 xbmc/addons/Addon.cpp
  3. +8 −13 xbmc/addons/AddonManager.cpp
View
3 language/English/strings.xml
@@ -2131,6 +2131,9 @@
<string id="24009">Script</string>
<string id="24010">Visualization</string>
<string id="24011">Add-on repository</string>
+ <string id="24012">Subtitle service</string>
+ <string id="24013">Lyrics service</string>
+ <string id="24014">Script Library</string>
<string id="24020">Configure</string>
<string id="24021">Disable</string>
View
8 xbmc/addons/Addon.cpp
@@ -82,10 +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.python.weather", ADDON_SCRIPT_WEATHER, 24027 },
+ {"xbmc.python.subtitles", ADDON_SCRIPT_SUBTITLES, 24012 },
+ {"xbmc.python.lyrics", ADDON_SCRIPT_LYRICS, 24013 },
+ {"xbmc.python.library", ADDON_SCRIPT_LIBRARY, 24014 },
{"xbmc.gui.skin", ADDON_SKIN, 166 },
{"xbmc.addon.repository", ADDON_REPOSITORY, 24011 },
{"pvrclient", ADDON_PVRDLL, 0 }};
View
21 xbmc/addons/AddonManager.cpp
@@ -261,19 +261,14 @@ bool CAddonMgr::HasAddons(const TYPE &type, const CONTENT_TYPE &content/*= CONTE
bool CAddonMgr::GetAllAddons(VECADDONS &addons, bool enabledOnly/*= true*/)
{
- VECADDONS temp;
- if (CAddonMgr::Get().GetAddons(ADDON_PLUGIN, temp, CONTENT_NONE, enabledOnly))
- addons.insert(addons.end(), temp.begin(), temp.end());
- if (CAddonMgr::Get().GetAddons(ADDON_SCRAPER, temp, CONTENT_NONE, enabledOnly))
- addons.insert(addons.end(), temp.begin(), temp.end());
- if (CAddonMgr::Get().GetAddons(ADDON_SCREENSAVER, temp, CONTENT_NONE, enabledOnly))
- addons.insert(addons.end(), temp.begin(), temp.end());
- if (CAddonMgr::Get().GetAddons(ADDON_SCRIPT, temp, CONTENT_NONE, enabledOnly))
- addons.insert(addons.end(), temp.begin(), temp.end());
- if (CAddonMgr::Get().GetAddons(ADDON_SKIN, temp, CONTENT_NONE, enabledOnly))
- addons.insert(addons.end(), temp.begin(), temp.end());
- if (CAddonMgr::Get().GetAddons(ADDON_VIZ, temp, CONTENT_NONE, enabledOnly))
- addons.insert(addons.end(), temp.begin(), temp.end());
+ for (int i = ADDON_UNKNOWN+1; i < ADDON_VIZ_LIBRARY; ++i)
+ {
+ if (ADDON_REPOSITORY == (TYPE)i)
+ continue;
+ VECADDONS temp;
+ if (CAddonMgr::Get().GetAddons((TYPE)i, temp, CONTENT_NONE, enabledOnly))
+ addons.insert(addons.end(), temp.begin(), temp.end());
+ }
return !addons.empty();
}

0 comments on commit 816cf12

Please sign in to comment.
Something went wrong with that request. Please try again.