mirror of
https://github.com/MuRuLOSE/limoka.git
synced 2026-06-18 15:14:18 +02:00
hotfix again
This commit is contained in:
@@ -391,9 +391,9 @@ class Limoka(loader.Module):
|
|||||||
else:
|
else:
|
||||||
self.ix = open_dir("limoka_search")
|
self.ix = open_dir("limoka_search")
|
||||||
self._history = self.pointer("history", [])
|
self._history = self.pointer("history", [])
|
||||||
self.modules = await self.api.fetch_json(
|
self.modules = (await self.api.fetch_json(
|
||||||
self._base_url, "modules.json"
|
self._base_url, "modules.json"
|
||||||
)
|
)).get("modules", {})
|
||||||
raw = (await self.api.fetch_json(
|
raw = (await self.api.fetch_json(
|
||||||
self._base_url, "repositories.json"
|
self._base_url, "repositories.json"
|
||||||
)).get("repositories", [])
|
)).get("repositories", [])
|
||||||
@@ -433,7 +433,7 @@ class Limoka(loader.Module):
|
|||||||
async def _update_index(self):
|
async def _update_index(self):
|
||||||
writer = self.ix.writer()
|
writer = self.ix.writer()
|
||||||
modules_to_index = self._filter_newbies(self.modules)
|
modules_to_index = self._filter_newbies(self.modules)
|
||||||
for module_path, module_data in modules_to_index["modules"].items():
|
for module_path, module_data in modules_to_index.items():
|
||||||
writer.add_document(
|
writer.add_document(
|
||||||
title=module_data["name"],
|
title=module_data["name"],
|
||||||
path=module_path,
|
path=module_path,
|
||||||
@@ -529,7 +529,7 @@ class Limoka(loader.Module):
|
|||||||
repo_key = "/".join(module_path.split("/")[:2]) if "/" in module_path else module_path
|
repo_key = "/".join(module_path.split("/")[:2]) if "/" in module_path else module_path
|
||||||
tags_list = []
|
tags_list = []
|
||||||
for x in self.repositories:
|
for x in self.repositories:
|
||||||
if x.replace("https://github.com/") == repo_key:
|
if x.replace("https://github.com/", "") == repo_key:
|
||||||
tags_list = self.repositories.get(x, {}).get("tags", [])
|
tags_list = self.repositories.get(x, {}).get("tags", [])
|
||||||
break
|
break
|
||||||
tags_text = ", ".join(self.strings["tags"].get(tag, tag) for tag in tags_list)
|
tags_text = ", ".join(self.strings["tags"].get(tag, tag) for tag in tags_list)
|
||||||
|
|||||||
Reference in New Issue
Block a user