feat(download): auto-categorize downloads into folders by file extension (#1572)

This commit is contained in:
WuFeng authored and GitHub committed 2026-10-23 20:38:25 +08:00
1 parent d125d4ab75
commit 9aae13453a
55 files changed
+4403 -217

No files matched your search

+8
View File
@@ -1195,6 +1195,14 @@ func doTest0(onStart func(cfg *model.StartConfig), handler func()) {
onStart(cfg)
}
fileListener := doStart(cfg)
// The server process configures the default download directory on first
// load; a task without a base directory is rejected without it.
if current, err := Downloader.GetConfig(); err == nil {
current.DownloadDir = downloadDir
if err := Downloader.PutConfig(current); err != nil {
panic(err)
}
}
defer func() {
if err := fileListener.Close(); err != nil {
panic(err)