diff options
author | mglae <mglmail@arcor.de> | 2023-03-05 12:26:44 +0100 |
---|---|---|
committer | mglae <mglmail@arcor.de> | 2023-03-05 12:26:44 +0100 |
commit | 61d25225e2a31df6330e1e3e0412e36402fdc046 (patch) | |
tree | 869adc6d361965aed64b3700e0a59f118d562846 | |
parent | 56b88b2bf5d82fd2b2feb4df4b35f81e70ca1b89 (diff) |
addons: having no repos is no error
Be able to install addons from ZIP without having valid repos because
of no internet connection.
-rw-r--r-- | xbmc/addons/AddonDatabase.cpp | 7 | ||||
-rw-r--r-- | xbmc/addons/AddonRepos.cpp | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/xbmc/addons/AddonDatabase.cpp b/xbmc/addons/AddonDatabase.cpp index dbbf204322..29837be2f6 100644 --- a/xbmc/addons/AddonDatabase.cpp +++ b/xbmc/addons/AddonDatabase.cpp @@ -687,6 +687,13 @@ bool CAddonDatabase::GetRepositoryContent(const std::string& id, VECADDONS& addo if (repoIds.empty()) { + if (id.empty()) + { + CLog::Log(LOGDEBUG, "CAddonDatabase: no valid repository, continuing"); + addons = {}; + return true; + } + CLog::Log(LOGDEBUG, "CAddonDatabase: no valid repository matching '{}'", id); return false; } diff --git a/xbmc/addons/AddonRepos.cpp b/xbmc/addons/AddonRepos.cpp index 3d45569c6c..80bfc63989 100644 --- a/xbmc/addons/AddonRepos.cpp +++ b/xbmc/addons/AddonRepos.cpp @@ -106,6 +106,8 @@ bool CAddonRepos::LoadAddonsFromDatabase(const std::string& addonId, { // load full repository content m_addonDb.GetRepositoryContent(m_allAddons); + if (m_allAddons.empty()) + return true; } else { |