update download url
This commit is contained in:
parent
8716ac7514
commit
6651ef9145
1 changed files with 2 additions and 2 deletions
|
@ -192,7 +192,7 @@ def _populate_variants(variants):
|
||||||
|
|
||||||
def _download_json_files():
|
def _download_json_files():
|
||||||
logger.verbose("Downloading JSON files for suits and variants from github...")
|
logger.verbose("Downloading JSON files for suits and variants from github...")
|
||||||
base_url = "https://raw.githubusercontent.com/Hanabi-Live/hanabi-live/main/packages/data/src/json"
|
base_url = "https://raw.githubusercontent.com/Hanabi-Live/hanabi-live/main/packages/game/src/json"
|
||||||
cache_dir = Path(platformdirs.user_cache_dir(constants.APP_NAME))
|
cache_dir = Path(platformdirs.user_cache_dir(constants.APP_NAME))
|
||||||
cache_dir.mkdir(parents=True, exist_ok=True)
|
cache_dir.mkdir(parents=True, exist_ok=True)
|
||||||
data = {}
|
data = {}
|
||||||
|
@ -204,7 +204,7 @@ def _download_json_files():
|
||||||
url = base_url + "/" + file.name
|
url = base_url + "/" + file.name
|
||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
if not response.status_code == 200:
|
if not response.status_code == 200:
|
||||||
err_msg = "Could not download initialization file {} from github (tried url {})".format(filename, url)
|
err_msg = "Could not download initialization file {} from github (tried url {})".format(file.name, url)
|
||||||
logger.error(err_msg)
|
logger.error(err_msg)
|
||||||
raise RuntimeError(err_msg)
|
raise RuntimeError(err_msg)
|
||||||
file.write_text(response.text)
|
file.write_text(response.text)
|
||||||
|
|
Loading…
Reference in a new issue