Change the default scanner to use new implementation

This commit is contained in:
Deluan 2020-07-19 21:39:06 -04:00
parent 482f46f3fd
commit d268075046
2 changed files with 5 additions and 6 deletions

View File

@ -40,7 +40,7 @@ type configOptions struct {
// DevFlags. These are used to enable/disable debugging and incomplete features // DevFlags. These are used to enable/disable debugging and incomplete features
DevLogSourceLine bool DevLogSourceLine bool
DevAutoCreateAdminPassword string DevAutoCreateAdminPassword string
DevNewScanner bool DevOldScanner bool
} }
var Server = &configOptions{} var Server = &configOptions{}
@ -99,7 +99,7 @@ func init() {
// DevFlags. These are used to enable/disable debugging and incomplete features // DevFlags. These are used to enable/disable debugging and incomplete features
viper.SetDefault("devlogsourceline", false) viper.SetDefault("devlogsourceline", false)
viper.SetDefault("devautocreateadminpassword", "") viper.SetDefault("devautocreateadminpassword", "")
viper.SetDefault("devnewscanner", false) viper.SetDefault("devoldscanner", false)
} }
func InitConfig(cfgFile string) { func InitConfig(cfgFile string) {

View File

@ -87,11 +87,10 @@ func (s *Scanner) loadFolders() {
} }
func (s *Scanner) newScanner(f model.MediaFolder) FolderScanner { func (s *Scanner) newScanner(f model.MediaFolder) FolderScanner {
if conf.Server.DevNewScanner { if conf.Server.DevOldScanner {
log.Warn("Using *experimental* new scanner") return NewTagScanner(f.Path, s.ds)
return NewTagScanner2(f.Path, s.ds)
} }
return NewTagScanner(f.Path, s.ds) return NewTagScanner2(f.Path, s.ds)
} }
type Status int type Status int