web-ui files are on S3 now
This commit is contained in:
parent
e67f55bd74
commit
05138e1db1
1 changed files with 4 additions and 4 deletions
|
@ -98,8 +98,8 @@ class LBRYUIManager(object):
|
||||||
return d
|
return d
|
||||||
else:
|
else:
|
||||||
log.info("Checking for updates for UI branch: " + branch)
|
log.info("Checking for updates for UI branch: " + branch)
|
||||||
self._git_url = "https://api.github.com/repos/lbryio/lbry-web-ui/git/refs/heads/%s" % branch
|
self._git_url = "https://s3.amazonaws.com/lbry-ui/{}/data.json".format(branch)
|
||||||
self._dist_url = "https://raw.githubusercontent.com/lbryio/lbry-web-ui/%s/dist.zip" % branch
|
self._dist_url = "https://s3.amazonaws.com/lbry-ui/{}/dist.zip".format(branch)
|
||||||
|
|
||||||
d = self._up_to_date()
|
d = self._up_to_date()
|
||||||
d.addCallback(lambda r: self._download_ui() if not r else self._load_ui())
|
d.addCallback(lambda r: self._download_ui() if not r else self._load_ui())
|
||||||
|
@ -109,7 +109,7 @@ class LBRYUIManager(object):
|
||||||
def _get_git_info():
|
def _get_git_info():
|
||||||
response = urlopen(self._git_url)
|
response = urlopen(self._git_url)
|
||||||
data = json.loads(response.read())
|
data = json.loads(response.read())
|
||||||
return defer.succeed(data['object']['sha'])
|
return defer.succeed(data['sha'])
|
||||||
|
|
||||||
def _set_git(version):
|
def _set_git(version):
|
||||||
self.git_version = version.replace('\n', '')
|
self.git_version = version.replace('\n', '')
|
||||||
|
@ -239,4 +239,4 @@ class LBRYUIManager(object):
|
||||||
def _load_ui(self):
|
def _load_ui(self):
|
||||||
for d in [i[0] for i in os.walk(self.active_dir) if os.path.dirname(i[0]) == self.active_dir]:
|
for d in [i[0] for i in os.walk(self.active_dir) if os.path.dirname(i[0]) == self.active_dir]:
|
||||||
self.root.putChild(os.path.basename(d), static.File(d))
|
self.root.putChild(os.path.basename(d), static.File(d))
|
||||||
return defer.succeed(True)
|
return defer.succeed(True)
|
||||||
|
|
Loading…
Reference in a new issue