4 Commits

Author SHA1 Message Date
Unlock Music Dev
2754c14fa6 Merge pull request 'fix: don't fatal while process dir' (#52) from fix/fatal-dir into master
Reviewed-on: https://git.unlock-music.dev/um/cli/pulls/52
2022-12-09 10:17:59 +00:00
Unlock Music Dev
8858ff37ad fix: don't fatal while process dir 2022-12-09 18:15:40 +08:00
Unlock Music Dev
d0d9836990 doc: update go version [skip ci] 2022-12-07 02:02:50 +08:00
Unlock Music Dev
1a508fc2b6 doc: update readme 2022-12-07 01:57:51 +08:00
2 changed files with 10 additions and 7 deletions

View File

@@ -9,13 +9,11 @@ Original: Web Edition https://git.unlock-music.dev/um/web
## Features
- [x] All Algorithm Supported By `unlock-music/web`
- [ ] Complete Cover Image
- [ ] Parse Meta Data
- [ ] Complete Meta Data
- [x] Complete Metadata & Cover Image
## Hou to Build
- Requirements: **Golang 1.17**
- Requirements: **Golang 1.19**
1. run `go install unlock-music.dev/cli/cmd/um@master`

View File

@@ -158,9 +158,14 @@ func (p *processor) processDir(inputDir string) error {
}
filePath := filepath.Join(inputDir, item.Name())
err := p.processFile(filePath)
if err != nil {
logger.Error("conversion failed", zap.String("source", filePath), zap.Error(err))
allDec := common.GetDecoder(filePath, p.skipNoopDecoder)
if len(allDec) == 0 {
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