Less warning messages when first running it.

They are actually `info` messages
This commit is contained in:
Deluan
2021-06-13 19:27:01 -04:00
parent 59b99d2206
commit 667701be02
2 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -376,7 +376,12 @@ func (s *TagScanner) loadTracks(filePaths []string) (model.MediaFiles, error) {
func (s *TagScanner) withAdminUser(ctx context.Context) context.Context {
u, err := s.ds.User(ctx).FindFirstAdmin()
if err != nil {
log.Warn(ctx, "No admin user found!", err)
c, err := s.ds.User(ctx).CountAll()
if c == 0 && err == nil {
log.Debug(ctx, "Scanner: No admin user yet!", err)
} else {
log.Error(ctx, "Scanner: No admin user found!", err)
}
u = &model.User{}
}