Skip to content

Commit

Permalink
change default resource_url
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetWq committed Mar 18, 2023
1 parent 16d954f commit 63100b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ meme_dirs = [] # 加载其他位置的表情包,填写文件夹路径
meme_disabled_list = [] # 禁用的表情包列表,填写表情的 `key`

[resource]
resource_url = "https://ghproxy.com/https://github.com/MeetWq/meme-generator" # 下载内置表情包图片时的资源链接
resource_url = "https://ghproxy.com/https://raw.githubusercontent.com/MeetWq/meme-generator" # 下载内置表情包图片时的资源链接

[gif]
gif_max_size = 10.0 # 限制生成的 gif 文件大小,单位为 Mb
Expand Down
5 changes: 3 additions & 2 deletions meme_generator/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class MemeConfig(BaseModel):


class ResourceConfig(BaseModel):
resource_url: str = "https://ghproxy.com/https://github.com/MeetWq/meme-generator"
resource_url: str = (
"https://ghproxy.com/https://raw.githubusercontent.com/MeetWq/meme-generator"
)


class GifConfig(BaseModel):
Expand Down Expand Up @@ -53,6 +55,5 @@ def dump(self):

if not config_file_path.exists():
meme_config = Config()
meme_config.dump()
else:
meme_config = Config.load()
2 changes: 1 addition & 1 deletion meme_generator/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


def _resource_url(path: str) -> str:
return f"{meme_config.resource.resource_url}/blob/v{__version__}/{path}"
return f"{meme_config.resource.resource_url}/v{__version__}/{path}"


async def check_resources():
Expand Down

0 comments on commit 63100b9

Please sign in to comment.