aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamland <thomas.amland@gmail.com>2016-07-17 19:58:06 +0200
committerGitHub <noreply@github.com>2016-07-17 19:58:06 +0200
commitadc190b76b62a0ea2168a69417379a75bd7e8f96 (patch)
treec2882a02b47b83a12b0e685f8914826a28b9a7e7
parentde739cc0b41fb9359182dd4fd5ff77f446058a9b (diff)
parentbc52fd9eec86bc9391d14c2a22e940187f685f73 (diff)
Merge pull request #10133 from tamland/repo_dupes
[addons] fix duplicate addons in repo list
-rw-r--r--xbmc/addons/AddonDatabase.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/xbmc/addons/AddonDatabase.cpp b/xbmc/addons/AddonDatabase.cpp
index 0898f9b58d..76fdb11589 100644
--- a/xbmc/addons/AddonDatabase.cpp
+++ b/xbmc/addons/AddonDatabase.cpp
@@ -677,7 +677,12 @@ bool CAddonDatabase::GetRepositoryContent(const std::string& id, VECADDONS& addo
auto addon = builder.Build();
if (addon)
- result.push_back(std::move(addon));
+ {
+ if (!result.empty() && result.back()->ID() == addonId)
+ result.back() = std::move(addon);
+ else
+ result.push_back(std::move(addon));
+ }
else
CLog::Log(LOGWARNING, "CAddonDatabase: failed to build %s", addonId.c_str());
m_pDS->next();