Skip to content

Commit 07768d3

Browse files
committed
fix: 添加空源数据检查并更新版本号
- 在 方法中添加对空源数据的检查,当源数据长度为 0 时直接返回 False,防止后续处理错误。 - 将项目版本号从 1.1.24 更新至 1.1.25,以标记此次修复发布。 此修复增强了下载源管理的健壮性,避免因空数据导致的潜在异常。版本更新遵循语义化版本规范,为小修复递增补丁号。
1 parent 611286b commit 07768d3

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "funread"
3-
version = "1.1.24"
3+
version = "1.1.25"
44
description = "一个用于管理和处理阅读源(Legado 阅读 APP 的书源和 RSS 源)的 Python 工具库"
55
readme = "README.md"
66
requires-python = ">=3.8"

src/funread/legado/manage/download/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ def add_source(self, source: Dict[str, Any], *args, **kwargs) -> bool:
168168
是否成功添加
169169
"""
170170
try:
171+
if len(source) == 0:
172+
return False
171173
# 计算 MD5
172174
md5 = get_md5_str(json.dumps(source, sort_keys=True))
173175

0 commit comments

Comments
 (0)