common_settings.go 852 B

1234567891011121314151617181920
  1. package settings
  2. type CommonSettings struct {
  3. UseHttpProxy bool `json:"use_http_proxy"` // 是否使用 http 代理
  4. HttpProxyAddress string `json:"http_proxy_address"` // Http 代理地址,内网
  5. ScanInterval string `json:"scan_interval"` // 一轮字幕扫描的间隔
  6. Threads int `json:"threads"` // 同时扫描的并发数
  7. RunScanAtStartUp bool `json:"run_scan_at_start_up"` // 完成引导设置后,下次运行程序就开始扫描
  8. MoviePaths []string `json:"movie_paths"` // 电影的目录
  9. SeriesPaths []string `json:"series_paths"` // 连续剧的目录
  10. }
  11. func NewCommonSettings() *CommonSettings {
  12. return &CommonSettings{
  13. ScanInterval: "6h",
  14. Threads: 1,
  15. MoviePaths: make([]string, 0),
  16. SeriesPaths: make([]string, 0),
  17. }
  18. }