mirror of
https://git.um-react.app/um/cli.git
synced 2025-11-28 03:33:02 +00:00
refactor: remove logging in algorithms
This commit is contained in:
@@ -3,9 +3,8 @@ package xm
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
|
||||
"github.com/unlock-music/cli/algo/common"
|
||||
"github.com/unlock-music/cli/internal/logging"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -29,10 +28,6 @@ type Decoder struct {
|
||||
audio []byte
|
||||
}
|
||||
|
||||
func (d *Decoder) GetCoverImage() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Decoder) GetAudioData() []byte {
|
||||
return d.audio
|
||||
}
|
||||
@@ -69,9 +64,6 @@ func (d *Decoder) Validate() error {
|
||||
return errors.New("detect unknown xm file type: " + string(d.file[4:8]))
|
||||
}
|
||||
|
||||
if d.file[14] != 0 {
|
||||
logging.Log().Warn("not a simple xm file", zap.Uint8("b[14]", d.file[14]))
|
||||
}
|
||||
d.headerLen = uint32(d.file[12]) | uint32(d.file[13])<<8 | uint32(d.file[14])<<16 // LittleEndian Unit24
|
||||
if d.headerLen+16 > uint32(lenData) {
|
||||
return ErrFileSize
|
||||
|
||||
Reference in New Issue
Block a user