Skip to content

Commit

Permalink
Fix Official Releases
Browse files Browse the repository at this point in the history
loop from LibreELEC-7.0 to the last version group
  • Loading branch information
ManuStrozor committed May 29, 2018
1 parent 1d5da15 commit 1492dc1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
12 changes: 8 additions & 4 deletions resources/lib/builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 6 additions & 3 deletions resources/lib/libreelec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down

0 comments on commit 1492dc1

Please sign in to comment.