diff options
author | tamland <thomas.amland@gmail.com> | 2016-07-17 19:58:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-17 19:58:06 +0200 |
commit | adc190b76b62a0ea2168a69417379a75bd7e8f96 (patch) | |
tree | c2882a02b47b83a12b0e685f8914826a28b9a7e7 | |
parent | de739cc0b41fb9359182dd4fd5ff77f446058a9b (diff) | |
parent | bc52fd9eec86bc9391d14c2a22e940187f685f73 (diff) |
Merge pull request #10133 from tamland/repo_dupes
[addons] fix duplicate addons in repo list
-rw-r--r-- | xbmc/addons/AddonDatabase.cpp | 7 |
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(); |