diff --git a/resources/lib/builds.py b/resources/lib/builds.py index 197b786..3e62867 100644 --- a/resources/lib/builds.py +++ b/resources/lib/builds.py @@ -206,10 +206,14 @@ class ReleaseLinkExtractor(BaseExtractor): def __iter__(self): base_url = "http://releases.libreelec.tv" json = self._json() - if libreelec.release() not in json: - return - releases = json[libreelec.release()]['project'][config.arch]['releases'] - for release in releases.itervalues(): + i = 7.0 + releases = [] + while "{0}-{1}".format(libreelec.name(), i) in json: + rels = json["{0}-{1}".format(libreelec.name(), i)]['project'][config.arch]['releases'] + for rel in rels.itervalues(): + releases.append(rel) + i += 1 + for release in releases: filename = release['file']['name'] release_name = re.search('-([\d\.]+).tar', filename).group(1) release_link = ReleaseLink(base_url, filename, release_name) diff --git a/resources/lib/libreelec.py b/resources/lib/libreelec.py index a40bd2b..c5d7bca 100644 --- a/resources/lib/libreelec.py +++ b/resources/lib/libreelec.py @@ -11,10 +11,13 @@ def release(): - dist = OS_RELEASE['NAME'] - return "{name}-{version}".format(name=dist, - version=OS_RELEASE['VERSION_ID']) + return "{name}-{version}".format(name=OS_RELEASE['NAME'], version=OS_RELEASE['VERSION_ID']) +def name(): + return OS_RELEASE['NAME'] + +def version(): + return OS_RELEASE['VERSION_ID'] def mount_readwrite(): subprocess.check_call(['mount', '-o', 'rw,remount', '/flash'])