-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3057 from MilhouseVH/le90_kodi_bogus_deps
kodi: Hack around 'not available' notification with built-in dependen…
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...iacenter/kodi/patches/kodi-999.99.avoid-bogus-dependency-not-available-notification.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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;}); |