Skip to content

Commit

Permalink
Merge pull request #721 from Night-stars-1/main-beta
Browse files Browse the repository at this point in the history
fix: 更改地图来源
  • Loading branch information
Night-stars-1 authored Oct 3, 2023
2 parents 14859b4 + 300e448 commit 6b1f64d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Honkai_Star_Rail.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self) -> None:
'skip_verify': False,
'type': "map",
'version': "map",
'url_zip': f"https://raw.githubusercontent.com/{sra_config_obj.github_source}/StarRailAssistant/map/map.zip",
'url_zip': f"https://raw.githubusercontent.com/Starry-Wind/StarRailAssistant/map/map.zip",
'unzip_path': "map",
'keep_folder': [],
'keep_file': [],
Expand All @@ -75,7 +75,7 @@ def __init__(self) -> None:
'skip_verify': False,
'type': "picture",
'version': "map",
'url_zip': f"https://raw.githubusercontent.com/{sra_config_obj.github_source}/StarRailAssistant/map/picture.zip",
'url_zip': f"https://raw.githubusercontent.com/Starry-Wind/StarRailAssistant/map/picture.zip",
'unzip_path': "picture",
'keep_folder': [],
'keep_file': [],
Expand Down
6 changes: 3 additions & 3 deletions utils/update_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ async def is_latest(self, type: str, version: str, is_log: bool = True):
return await self.is_sra_latest(type, version, is_log)
for index, __ in enumerate(range(3)):
try:
url_version = f"{raw_proxy}https://raw.githubusercontent.com/Night-stars-1/Auto_Star_Rail_MAP/main/version.json" if "http" in raw_proxy or raw_proxy == "" else f"https://raw.githubusercontent.com/{self.github_source}/StarRailAssistant/{version}/version.json".replace("raw.githubusercontent.com", raw_proxy)
url_version = f"{raw_proxy}https://raw.githubusercontent.com/Night-stars-1/Auto_Star_Rail_MAP/main/version.json" if "http" in raw_proxy or raw_proxy == "" else f"https://raw.githubusercontent.com/Starry-Wind/StarRailAssistant/{version}/version.json".replace("raw.githubusercontent.com", raw_proxy)
remote_version = await get(url_version, timeout=2)
remote_version = remote_version.json()["version"]
break
Expand Down Expand Up @@ -278,9 +278,9 @@ async def update_file(self,
raw_proxy = sra_config_obj.rawgithub_proxy
url_zip = url_proxy+url_zip if "http" in url_proxy or url_proxy == "" else url_zip.replace("github.com", url_proxy)
if type == "star":
url_list = f"{raw_proxy}https://raw.githubusercontent.com/{self.github_source}/StarRailAssistant/main/{type}_list.json" if "http" in raw_proxy or raw_proxy == "" else f"https://raw.githubusercontent.com/{self.github_source}/StarRailAssistant/main/{type}_list.json".replace("raw.githubusercontent.com", raw_proxy)
url_list = f"{raw_proxy}https://raw.githubusercontent.com/Starry-Wind/StarRailAssistant/main/{type}_list.json" if "http" in raw_proxy or raw_proxy == "" else f"https://raw.githubusercontent.com/Starry-Wind/StarRailAssistant/main/{type}_list.json".replace("raw.githubusercontent.com", raw_proxy)
else:
url_list = f"{raw_proxy}https://raw.githubusercontent.com/Night-stars-1/Auto_Star_Rail_MAP/main/{type}_list.json" if "http" in raw_proxy or raw_proxy == "" else f"https://raw.githubusercontent.com/{self.github_source}/StarRailAssistant_MAP/main/{type}_list.json".replace("raw.githubusercontent.com", raw_proxy)
url_list = f"{raw_proxy}https://raw.githubusercontent.com/Night-stars-1/Auto_Star_Rail_MAP/main/{type}_list.json" if "http" in raw_proxy or raw_proxy == "" else f"https://raw.githubusercontent.com/Night-stars-1/StarRailAssistant_MAP/main/{type}_list.json".replace("raw.githubusercontent.com", raw_proxy)
#tmp_zip = os.path.join(tmp_dir, f"{type}.zip")
tmp_zip = Path() / tmp_dir / f"{type}.zip"
if not os.path.exists(tmp_dir):
Expand Down

0 comments on commit 6b1f64d

Please sign in to comment.