Skip to content

Commit e53aef5

Browse files
committed
feat: 为下载源添加customOrder字段支持
- 在pyproject.toml中将版本号从1.1.36更新至1.1.37 - 在DownloadSource类的处理逻辑中添加对customOrder字段的支持 - 当数据中包含customOrder字段时,将其添加到source对象中 此次修改扩展了下载源的数据结构,允许源数据包含自定义排序字段, 为后续的源排序功能提供基础支持。版本更新反映了此次功能增强。
1 parent ac55db0 commit e53aef5

2 files changed

Lines changed: 3 additions & 2 deletions

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.36"
3+
version = "1.1.37"
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ def export_sources(self, size: int = 1000) -> Iterator[List[Dict[str, Any]]]:
330330
source["sourceUrl"] = (
331331
f"{source['sourceUrl']}#{item['md5_list'][0][:10]}"
332332
)
333-
333+
if "customOrder" in data:
334+
source["customOrder"] = data["customOrder"]
334335
dd.append(source)
335336
if len(dd) >= size:
336337
yield dd

0 commit comments

Comments
 (0)