Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1879 from Montellese/addons_extpoint_minversion

addons: use the extension-point's version if no minversion (i.e. no <backwards-compatibility> tag) is specified when checking imported extension-points
  • Loading branch information...
commit 08666e76950719918a2636071eb6aa7c840130e9 2 parents d78d85e + e2e8068
@MartijnKaijser MartijnKaijser authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 xbmc/addons/Addon.cpp
View
8 xbmc/addons/Addon.cpp
@@ -32,6 +32,7 @@
#include "freebsd/FreeBSDGNUReplacements.h"
#endif
#include "utils/log.h"
+#include "utils/StringUtils.h"
#include "utils/URIUtils.h"
#include "URL.h"
#include <vector>
@@ -313,6 +314,13 @@ AddonPtr CAddon::Clone(const AddonPtr &self) const
bool CAddon::MeetsVersion(const AddonVersion &version) const
{
+ // if the addon is one of xbmc's extension point definitions (addonid starts with "xbmc.")
+ // and the minversion is "0.0.0" i.e. no <backwards-compatibility> tag has been specified
+ // we need to assume that the current version is not backwards-compatible and therefore check against the actual version
+ if (StringUtils::StartsWith(m_props.id, "xbmc.") &&
+ (strlen(m_props.minversion.c_str()) == 0 || StringUtils::EqualsNoCase(m_props.minversion.c_str(), "0.0.0")))
+ return m_props.version == version;
+
return m_props.minversion <= version && version <= m_props.version;
}
Please sign in to comment.
Something went wrong with that request. Please try again.