mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #3057 from MilhouseVH/le90_kodi_bogus_deps
kodi: Hack around 'not available' notification with built-in dependen…
This commit is contained in:
commit
b1a1182164
@ -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;});
|
Loading…
x
Reference in New Issue
Block a user