Skip to content

Commit b743003

Browse files
committed
🐛 fix: 修复段错误
1 parent e278f81 commit b743003

File tree

6 files changed

+74
-208
lines changed

6 files changed

+74
-208
lines changed

.github/workflows/publish_release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
name: Publish Windows Release
3+
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build:
16+
runs-on: windows-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Get Version Tag
23+
id: get_version
24+
run: |
25+
$tag = $(curl -s "https://api.github.com/repos/${{ github.repository }}/tags" | jq -r '.[0].name')
26+
$version = ($tag -replace '^v|\.', '').ToCharArray() -join '.'
27+
Write-Output "tag=$tag" >> $env:GITHUB_OUTPUT
28+
Write-Output "version=$version" >> $env:GITHUB_OUTPUT
29+
30+
- name: Upload to Release
31+
uses: softprops/action-gh-release@v2
32+
with:
33+
token: ${{ secrets.RELEASE }}
34+
name: ${{ steps.get_version.outputs.tag }}
35+
body_path: CHANGELOG.md
36+
make_latest: true
37+
tag_name: ${{ steps.get_version.outputs.tag }}
38+
draft: false
39+
prerelease: false
40+
generate_release_notes: false
41+
discussion_category_name: announcements

.github/workflows/release_build.yml

Lines changed: 0 additions & 143 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
1-
## 1.61.0 (2025-04-18)
2-
### 新增
3-
* 支持查看当前视频的大小,编码,码率等信息
4-
* 支持单独下载视频弹幕、字幕和封面
5-
* 支持监听剪切板,自动解析视频 (#108)
6-
* 支持更多自定义字段(发布时间,分区等)
7-
* 支持下载完成后进行文件 MD5 校验,避免合成失败
8-
* 支持修改自动添加的序号类型 (#112)
9-
10-
### 优化
11-
* 优化对话框创建逻辑,避免重复创建消耗额外内存 (#104)
12-
* 优化界面在不同缩放倍数下的显示效果
13-
* 优化 webview 加载逻辑,避免无法打开登录窗口 (#115)
14-
* 优化重复下载提示
15-
* 优化工具条提示
16-
1+
## 1.61.1 (2025-04-22)
172
### 修复
18-
* 修复视频只能下载 H.264 编码的问题 (#101)
19-
* 修复合集中的分 P 视频无法下载的问题 (#102)
20-
* 修复高缩放倍数下二维码显示不完整的问题 (#105)
3+
* 修复编译版程序闪退的问题 (#122)
4+
* 修复下载弹幕、字幕和封面设置项保存无法生效的问题
5+
* 修复配置文件不兼容导致无法合成视频的问题

README.md

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Bili23-Downloader
22
![Github](https://img.shields.io/badge/GitHub-black?logo=github&style=flat) ![Platform](https://img.shields.io/badge/Platform-Windows_|_Linux_|_macOS-blue?style=flat) ![License](https://img.shields.io/badge/license-MIT-orange?style=flat) ![Build](https://img.shields.io/github/actions/workflow/status/ScottSloan/Bili23-Downloader/release_build.yml)
33

4-
![Version](https://img.shields.io/github/v/release/ScottSloan/Bili23-Downloader?style=flat) ![Python](https://img.shields.io/badge/Python-3.11.9-green?style=flat) ![wxPython](https://img.shields.io/badge/wxPython-4.2.2-green?style=flat)
4+
![Version](https://img.shields.io/github/v/release/ScottSloan/Bili23-Downloader?style=flat) ![Python](https://img.shields.io/badge/Python-3.11.9-green?style=flat) ![wxPython](https://img.shields.io/badge/wxPython-4.2.3-green?style=flat)
55

66
[项目官网](https://bili23.scott-sloan.cn/)
77

@@ -25,26 +25,11 @@ Bili23 Downloader 是一款跨平台的 B 站视频下载工具,支持 Windows
2525
有关本程序的使用说明,请参考[项目文档](https://bili23.scott-sloan.cn/doc/waht-is-bili23-downloader.html)
2626

2727
## 更新日志
28-
### 1.61.0 (2025-04-18)
29-
#### 新增
30-
* 支持查看当前视频的大小,编码,码率等信息
31-
* 支持监听剪切板,自动解析视频
32-
* 支持单独下载视频弹幕、字幕和封面
33-
* 支持更多自定义字段(发布时间,分区等)
34-
* 支持下载完成后进行文件 MD5 校验,避免合成失败
35-
* 支持修改自动添加的序号类型
36-
37-
#### 优化
38-
* 优化对话框创建逻辑,避免重复创建消耗额外内存
39-
* 优化界面在不同缩放倍数下的显示效果
40-
* 优化 webview 加载逻辑,避免无法打开登录窗口
41-
* 优化重复下载提示
42-
* 优化工具条提示
43-
44-
#### 修复
45-
* 修复视频只能下载 H.264 编码的问题
46-
* 修复合集中的分 P 视频无法下载的问题
47-
* 修复高缩放倍数下二维码显示不完整的问题
28+
### 1.61.1 (2025-04-22)
29+
### 修复
30+
* 修复编译版程序闪退的问题 (#122)
31+
* 修复下载弹幕、字幕和封面设置项保存无法生效的问题
32+
* 修复配置文件不兼容导致无法合成视频的问题
4833

4934
## 免责声明
5035
本项目仅供个人学习与研究用途,任何通过本项目下载的内容仅限于个人使用,用户自行承担使用本项目可能带来的所有风险。

src/gui/window/settings.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ def save(self):
183183
"listen_clipboard": Config.Basic.listen_clipboard,
184184
"auto_popup_option_dialog": Config.Basic.auto_popup_option_dialog,
185185
"auto_show_download_window": Config.Basic.auto_show_download_window,
186-
"get_danmaku": Config.Basic.download_danmaku_file,
187-
"danmaku_type": Config.Basic.danmaku_file_type,
188-
"get_subtitle": Config.Basic.download_subtitle_file,
189-
"subtitle_type": Config.Basic.subtitle_file_type,
190-
"get_cover": Config.Basic.download_cover_file
186+
"download_danmaku_file": Config.Basic.download_danmaku_file,
187+
"danmaku_file_type": Config.Basic.danmaku_file_type,
188+
"download_subtitle_file": Config.Basic.download_subtitle_file,
189+
"subtitle_file_type": Config.Basic.subtitle_file_type,
190+
"download_cover_file": Config.Basic.download_cover_file
191191
}
192192

193193
config_utils.update_config_kwargs(Config.APP.app_config_path, "basic", **kwargs)
@@ -1137,7 +1137,7 @@ def onClearUserDataEVT(self, event):
11371137
dlg = wx.MessageDialog(self, "清除用户数据\n\n将清除用户登录信息、下载记录和程序设置,是否继续?\n\n程序将会重新启动。", "警告", wx.ICON_WARNING | wx.YES_NO)
11381138

11391139
if dlg.ShowModal() == wx.ID_YES:
1140-
config_utils.clear_config()
1140+
config_utils.remove_config_file()
11411141

11421142
shutil.rmtree(Config.User.directory)
11431143

@@ -1147,7 +1147,7 @@ def onResetToDefaultEVT(self, event):
11471147
dlg = wx.MessageDialog(self, "恢复默认设置\n\n是否要恢复默认设置?\n\n程序将会重新启动。", "警告", wx.ICON_WARNING | wx.YES_NO)
11481148

11491149
if dlg.ShowModal() == wx.ID_YES:
1150-
config_utils.clear_config()
1150+
config_utils.remove_config_file()
11511151

11521152
self.restart()
11531153

src/utils/config.py

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class Sys:
1515
class APP:
1616
name: str = "Bili23 Downloader"
1717

18-
version: str = "1.61.0"
19-
version_code: int = 1611
18+
version: str = "1.61.1"
19+
version_code: int = 1612
2020

2121
# 断点续传文件最低支持版本号
2222
task_file_min_version_code: int = 1611
@@ -174,13 +174,12 @@ def create_files():
174174

175175
def after_read_config():
176176
def check_config_version():
177-
if "header" in app_config:
178-
if app_config.get("header").get("min_version", 0) < Config.APP.config_file_min_version_code:
179-
self.clear_config()
177+
min_version = app_config.get("header", {"min_version": 0}).get("min_version", 0)
178+
179+
if min_version < Config.APP.config_file_min_version_code:
180+
self.remove_config_file()
180181

181-
self.load_config()
182-
183-
return
182+
app_config.clear()
184183

185184
def check_config_node_name():
186185
for node_name in ["header", "basic", "download", "advanced","merge", "extra", "proxy", "misc"]:
@@ -195,9 +194,9 @@ def check_config_node_name():
195194
if node_name not in user_config:
196195
user_config[node_name] = {}
197196

198-
check_config_node_name()
199-
200197
check_config_version()
198+
199+
check_config_node_name()
201200

202201
def get_path():
203202
match Platform(Config.Sys.platform):
@@ -223,6 +222,12 @@ def get_path():
223222
# basic
224223
Config.Basic.listen_clipboard = app_config["basic"].get("listen_clipboard", Config.Basic.listen_clipboard)
225224
Config.Basic.auto_popup_option_dialog = app_config["basic"].get("auto_popup_option_dialog", Config.Basic.auto_popup_option_dialog)
225+
Config.Basic.auto_show_download_window = app_config["basic"].get("auto_show_download_window", Config.Basic.auto_show_download_window)
226+
Config.Basic.download_danmaku_file = app_config["basic"].get("download_danmaku_file", Config.Basic.download_danmaku_file)
227+
Config.Basic.danmaku_file_type = app_config["basic"].get("danmaku_file_type", Config.Basic.danmaku_file_type)
228+
Config.Basic.download_subtitle_file = app_config["basic"].get("download_subtitle_file", Config.Basic.download_subtitle_file)
229+
Config.Basic.subtitle_file_type = app_config["basic"].get("subtitle_file_type", Config.Basic.subtitle_file_type)
230+
Config.Basic.download_cover_file = app_config["basic"].get("download_cover_file", Config.Basic.download_cover_file)
226231

227232
# download
228233
Config.Download.path = app_config["download"].get("path", Config.Download.path)
@@ -257,13 +262,6 @@ def get_path():
257262
Config.Merge.override_option = app_config["merge"].get("override_option", Config.Merge.override_option)
258263
Config.Merge.m4a_to_mp3 = app_config["merge"].get("m4a_to_mp3", Config.Merge.m4a_to_mp3)
259264

260-
# extra
261-
Config.Basic.download_danmaku_file = app_config["extra"].get("download_danmaku_file", Config.Basic.download_danmaku_file)
262-
Config.Basic.danmaku_file_type = app_config["extra"].get("danmaku_file_type", Config.Basic.danmaku_file_type)
263-
Config.Basic.download_subtitle_file = app_config["extra"].get("download_subtitle_file", Config.Basic.download_subtitle_file)
264-
Config.Basic.subtitle_file_type = app_config["extra"].get("subtitle_file_type", Config.Basic.subtitle_file_type)
265-
Config.Basic.download_cover_file = app_config["extra"].get("download_cover_file", Config.Basic.download_cover_file)
266-
267265
# proxy
268266
Config.Proxy.proxy_mode = app_config["proxy"].get("proxy_mode", Config.Proxy.proxy_mode)
269267
Config.Proxy.proxy_ip = app_config["proxy"].get("proxy_ip", Config.Proxy.proxy_ip)
@@ -315,7 +313,7 @@ def update_config_kwargs(self, file_path: str, category: str, **kwargs):
315313
self.write_config_json(file_path, config)
316314

317315
@staticmethod
318-
def clear_config():
316+
def remove_config_file():
319317
from utils.tool_v2 import UniversalTool
320318

321319
UniversalTool.remove_files([UniversalTool.get_file_path(os.getcwd(), "config.json")])

0 commit comments

Comments
 (0)