mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-16 13:23:41 +00:00
feat(download): auto-categorize downloads into folders by file extension (#1572)
This commit is contained in:
1 parent
d125d4ab75
commit
9aae13453a
55 files changed
+4403
-217
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user