1
0
forked from um/cli

fix: don't fatal while process dir

This commit is contained in:
Unlock Music Dev 2022-12-09 18:15:40 +08:00
parent d0d9836990
commit 8858ff37ad
Signed by untrusted user: um-dev
GPG Key ID: 95202E10D3413A1D

View File

@ -158,9 +158,14 @@ func (p *processor) processDir(inputDir string) error {
} }
filePath := filepath.Join(inputDir, item.Name()) filePath := filepath.Join(inputDir, item.Name())
err := p.processFile(filePath) allDec := common.GetDecoder(filePath, p.skipNoopDecoder)
if err != nil { if len(allDec) == 0 {
logger.Error("conversion failed", zap.String("source", filePath), zap.Error(err)) logger.Info("skipping while no suitable decoder", zap.String("source", item.Name()))
continue
}
if err := p.process(filePath, allDec); err != nil {
logger.Error("conversion failed", zap.String("source", item.Name()), zap.Error(err))
} }
} }
return nil return nil