mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
Add new scanner algorithm, can be enabled with DevNewScanner config option
This commit is contained in:
parent
de0cc1f268
commit
51c295d1de
11 changed files with 750 additions and 160 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/deluan/navidrome/conf"
|
||||
"github.com/deluan/navidrome/log"
|
||||
"github.com/deluan/navidrome/model"
|
||||
)
|
||||
|
@ -81,10 +82,17 @@ func (s *Scanner) loadFolders() {
|
|||
fs, _ := s.ds.MediaFolder(context.TODO()).GetAll()
|
||||
for _, f := range fs {
|
||||
log.Info("Configuring Media Folder", "name", f.Name, "path", f.Path)
|
||||
s.folders[f.Path] = NewTagScanner(f.Path, s.ds)
|
||||
s.folders[f.Path] = s.newScanner(f)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Scanner) newScanner(f model.MediaFolder) FolderScanner {
|
||||
if conf.Server.DevNewScanner {
|
||||
return NewTagScanner2(f.Path, s.ds)
|
||||
}
|
||||
return NewTagScanner(f.Path, s.ds)
|
||||
}
|
||||
|
||||
type Status int
|
||||
|
||||
type StatusInfo struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue