Skip to content

The only downloader you need. 下载器的集大成者。

- 将下载文件夹的默认路径从当前目录修改为系统下载目录

XiaoYouChR5d45c8a3f103
diff --git a/app/common/config.py b/app/common/config.py
index 2aaf519d..19cdc51f 100644
--- a/app/common/config.py
+++ b/app/common/config.py
@@ -2,7 +2,7 @@
import sys
from re import compile
-from PySide6.QtCore import QDir, QRect
+from PySide6.QtCore import QRect, QStandardPaths
from qfluentwidgets import (QConfig, ConfigItem, OptionsConfigItem, BoolValidator,
OptionsValidator, RangeConfigItem, RangeValidator,
FolderValidator, ConfigValidator, ConfigSerializer, FolderListValidator)
@@ -52,7 +52,7 @@ class Config(QConfig):
# download
maxReassignSize = RangeConfigItem("Download", "MaxReassignSize", 8, RangeValidator(1, 100))
downloadFolder = ConfigItem(
- "Download", "DownloadFolder", QDir.currentPath(), FolderValidator())
+ "Download", "DownloadFolder", QStandardPaths.writableLocation(QStandardPaths.DownloadLocation), FolderValidator())
historyDownloadFolder = ConfigItem("Download", "HistoryDownloadFolder", [], FolderListValidator())
preBlockNum = RangeConfigItem("Download", "PreBlockNum", 8, RangeValidator(1, 256))