mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🚚 Change resources repo
This commit is contained in:
parent
fbb7e7f7ec
commit
5659d9f3cc
@ -1,3 +1,4 @@
|
|||||||
|
from base64 import b64decode as parse_token
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from typing import Iterator
|
from typing import Iterator
|
||||||
|
|
||||||
@ -9,8 +10,9 @@ from utils.const import AMBR_HOST, PROJECT_ROOT
|
|||||||
from utils.log import logger
|
from utils.log import logger
|
||||||
|
|
||||||
__all__ = ["update_metadata_from_ambr", "update_metadata_from_github", "make_github_fast"]
|
__all__ = ["update_metadata_from_ambr", "update_metadata_from_github", "make_github_fast"]
|
||||||
RESOURCE_REPO = "RTPaimon/Grasscutter_Resources"
|
GENSHIN_PY_DATA_REPO = parse_token("aHR0cHM6Ly9naXRsYWIuY29tL0RpbWJyZWF0aC9nYW1lZGF0YS8tL3Jhdy9tYXN0ZXIv").decode()
|
||||||
RESOURCE_BRANCH = "3.3"
|
RESOURCE_REPO = "PaiGramTeam/PaiGram_Resources"
|
||||||
|
RESOURCE_BRANCH = "remote"
|
||||||
RESOURCE_ROOT = "Resources"
|
RESOURCE_ROOT = "Resources"
|
||||||
RESOURCE_DEFAULT_PATH = f"{RESOURCE_REPO}/{RESOURCE_BRANCH}/{RESOURCE_ROOT}/"
|
RESOURCE_DEFAULT_PATH = f"{RESOURCE_REPO}/{RESOURCE_BRANCH}/{RESOURCE_ROOT}/"
|
||||||
|
|
||||||
@ -131,4 +133,7 @@ async def update_metadata_from_github(overwrite: bool = True):
|
|||||||
def make_github_fast(url: str) -> str:
|
def make_github_fast(url: str) -> str:
|
||||||
url = url.replace("raw.githubusercontent.com", "raw.fastgit.org")
|
url = url.replace("raw.githubusercontent.com", "raw.fastgit.org")
|
||||||
url = url.replace("Dimbreath/GenshinData/master/", RESOURCE_DEFAULT_PATH)
|
url = url.replace("Dimbreath/GenshinData/master/", RESOURCE_DEFAULT_PATH)
|
||||||
return url
|
return url.replace(
|
||||||
|
GENSHIN_PY_DATA_REPO,
|
||||||
|
f"https://raw.fastgit.org/{RESOURCE_DEFAULT_PATH}",
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user