mirror of
https://git.unlock-music.dev/um/cli.git
synced 2025-07-07 06:52:10 +08:00
refactor: move audio sniffer to internal package
This commit is contained in:
@ -4,6 +4,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"unlock-music.dev/cli/internal/sniff"
|
||||
)
|
||||
|
||||
type RawDecoder struct {
|
||||
@ -26,7 +28,7 @@ func (d *RawDecoder) Validate() error {
|
||||
}
|
||||
|
||||
var ok bool
|
||||
d.audioExt, ok = SniffAll(header)
|
||||
d.audioExt, ok = sniff.AudioExtension(header)
|
||||
if !ok {
|
||||
return errors.New("raw: sniff audio type failed")
|
||||
}
|
||||
|
Reference in New Issue
Block a user