Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zkitefly committed May 3, 2024
1 parent 66a639f commit bf2af33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions installer-gitee.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def download_selected_version():
export_path = export_entry.get()
versions_folder = os.path.join(export_path, "versions", version_id)
os.makedirs(versions_folder, exist_ok=True)
download_file(url, versions_folder)
download_file(version_id, url, versions_folder)

def download_file(url, download_path):
file_name = url.split('/')[-1]
def download_file(version_id, url, download_path):
file_name = version_id
full_path = os.path.join(download_path, file_name)
urllib.request.urlretrieve(url, full_path)
status_label.config(text=f"下载完成 {file_name}{download_path}")
Expand All @@ -53,7 +53,7 @@ def fetch_versions():

# 创建主窗口
root = tk.Tk()
root.title("unlisted-versions-of-minecraft 版本下载器 - v1.1")
root.title("unlisted-versions-of-minecraft 版本下载器 - v1.2")

# 创建下载路径输入框和按钮
export_frame = ttk.Frame(root)
Expand Down
8 changes: 4 additions & 4 deletions installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def download_selected_version():
export_path = export_entry.get()
versions_folder = os.path.join(export_path, "versions", version_id)
os.makedirs(versions_folder, exist_ok=True)
download_file(url, versions_folder)
download_file(version_id, url, versions_folder)

def download_file(url, download_path):
file_name = url.split('/')[-1]
def download_file(version_id, url, download_path):
file_name = version_id
full_path = os.path.join(download_path, file_name)
urllib.request.urlretrieve(url, full_path)
status_label.config(text=f"下载完成 {file_name}{download_path}")
Expand All @@ -53,7 +53,7 @@ def fetch_versions():

# 创建主窗口
root = tk.Tk()
root.title("unlisted-versions-of-minecraft 版本下载器 - v1.1")
root.title("unlisted-versions-of-minecraft 版本下载器 - v1.2")

# 创建下载路径输入框和按钮
export_frame = ttk.Frame(root)
Expand Down

0 comments on commit bf2af33

Please sign in to comment.