Skip to content

Commit

Permalink
Merge pull request #3057 from MilhouseVH/le90_kodi_bogus_deps
Browse files Browse the repository at this point in the history
kodi: Hack around 'not available' notification with built-in dependen…
  • Loading branch information
CvH authored Nov 4, 2018
2 parents 97d7dee + 95c6348 commit b1a1182
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp
index ef662d3..fe97b1f 100644
--- a/xbmc/addons/AddonManager.cpp
+++ b/xbmc/addons/AddonManager.cpp
@@ -14,6 +14,7 @@
#include "events/EventLog.h"
#include "events/NotificationEvent.h"
#include "filesystem/File.h"
+#include "filesystem/Directory.h"
#include "filesystem/SpecialProtocol.h"
#include "utils/log.h"
#include "utils/StringUtils.h"
@@ -1259,7 +1260,8 @@ bool CAddonMgr::IsCompatible(const IAddon& addon)
// Intentionally only check the xbmc.* and kodi.* magic dependencies. Everything else will
// not be missing anyway, unless addon was installed in an unsupported way.
if (StringUtils::StartsWith(dependency.id, "xbmc.") ||
- StringUtils::StartsWith(dependency.id, "kodi."))
+ StringUtils::StartsWith(dependency.id, "kodi.") ||
+ CDirectory::Exists("/usr/share/kodi/addons/" + dependency.id))
{
AddonPtr addon;
bool haveAddon = GetAddon(dependency.id, addon);
@@ -1287,7 +1289,8 @@ std::vector<DependencyInfo> CAddonMgr::GetDepsRecursive(const std::string& id)
auto current_dep = *toProcess.begin();
toProcess.erase(toProcess.begin());
if (StringUtils::StartsWith(current_dep.id, "xbmc.") ||
- StringUtils::StartsWith(current_dep.id, "kodi."))
+ StringUtils::StartsWith(current_dep.id, "kodi.") ||
+ CDirectory::Exists("/usr/share/kodi/addons/" + current_dep.id))
continue;

auto added_it = std::find_if(added.begin(), added.end(), [&](const DependencyInfo& d){ return d.id == current_dep.id;});

0 comments on commit b1a1182

Please sign in to comment.