Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
rearrange the searchprovider config
Browse files Browse the repository at this point in the history
  • Loading branch information
boypt committed Jul 14, 2021
1 parent f7fef50 commit 2cad626
Show file tree
Hide file tree
Showing 11 changed files with 441 additions and 135 deletions.
2 changes: 0 additions & 2 deletions engine/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const (

const (
defaultTrackerListURL = "https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt"
defaultScraperURL = "https://raw.githubusercontent.com/boypt/simple-torrent/master/scraper-config.json"
)

type Config struct {
Expand Down Expand Up @@ -75,7 +74,6 @@ func InitConf(specPath string) (*Config, error) {
viper.SetDefault("ObfsPreferred", true)
viper.SetDefault("ObfsRequirePreferred", false)
viper.SetDefault("IncomingPort", 50007)
viper.SetDefault("ScraperURL", defaultScraperURL)
viper.SetDefault("MaxConcurrentTask", 0)
viper.SetDefault("AllowRuntimeConfigure", true)

Expand Down
3 changes: 0 additions & 3 deletions engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ func (e *Engine) Configure(c *Config) error {
if c.IncomingPort <= 0 {
return fmt.Errorf("Invalid incoming port (%d)", c.IncomingPort)
}
if c.ScraperURL == "" {
c.ScraperURL = defaultScraperURL
}
if c.TrackerList == "" {
c.TrackerList = "remote:" + defaultTrackerListURL
}
Expand Down
Loading

0 comments on commit 2cad626

Please sign in to comment.