Ignore duplicates due to add-ons with multiple extension points when retrieving the...
authorGarrett Brown <garbearucla@gmail.com>
Sat, 2 Feb 2013 01:56:52 +0000 (17:56 -0800)
committerGarrett Brown <garbearucla@gmail.com>
Sat, 2 Feb 2013 02:07:12 +0000 (18:07 -0800)
xbmc/addons/AddonManager.cpp

index 5153f5d..a3a05d3 100644 (file)
@@ -374,7 +374,15 @@ bool CAddonMgr::GetAllOutdatedAddons(VECADDONS &addons, bool enabled /*= true*/)
       AddonPtr repoAddon;
       for (unsigned int j = 0; j < temp.size(); j++)
       {
-        if (!m_database.GetAddon(temp[j]->ID(), repoAddon))
+        // Ignore duplicates due to add-ons with multiple extension points
+        bool found = false;
+        for (VECADDONS::const_iterator addonIt = addons.begin(); addonIt != addons.end(); addonIt++)
+        {
+          if ((*addonIt)->ID() == temp[j]->ID())
+            found = true;
+        }
+
+        if (found || !m_database.GetAddon(temp[j]->ID(), repoAddon))
           continue;
 
         if (temp[j]->Version() < repoAddon->Version() &&