mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-15 21:03:41 +00:00
feat: extension support (#78)
This commit is contained in:
118 files changed
+6971
-780
No files matched your search
@@ -75,6 +75,8 @@ type DownloaderConfig struct {
|
||||
Storage Storage
|
||||
StorageDir string
|
||||
|
||||
ProductionMode bool
|
||||
|
||||
*DownloaderStoreConfig
|
||||
}
|
||||
|
||||
@@ -99,7 +101,7 @@ func (cfg *DownloaderConfig) Init() *DownloaderConfig {
|
||||
|
||||
// DownloaderStoreConfig is the config that can restore the downloader.
|
||||
type DownloaderStoreConfig struct {
|
||||
FirstLoad bool `json:"-"` // fromNoStore is the flag that the config is first time init and not from store
|
||||
FirstLoad bool `json:"-"` // FirstLoad is the flag that the config is first time init and not from store
|
||||
|
||||
DownloadDir string `json:"downloadDir"` // DownloadDir is the default directory to save the downloaded files
|
||||
MaxRunning int `json:"maxRunning"` // MaxRunning is the max running download count
|
||||
@@ -109,7 +111,7 @@ type DownloaderStoreConfig struct {
|
||||
|
||||
func (cfg *DownloaderStoreConfig) Init() *DownloaderStoreConfig {
|
||||
if cfg.MaxRunning == 0 {
|
||||
cfg.MaxRunning = 3
|
||||
cfg.MaxRunning = 5
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
Reference in new issue
Block a user