mirror of
https://git.um-react.app/um/cli.git
synced 2025-11-28 11:43:02 +00:00
refactor: code cleaning
This commit is contained in:
@@ -36,22 +36,19 @@ func NewDecoder(rd io.ReadSeeker) common.Decoder {
|
||||
}
|
||||
|
||||
type Decoder struct {
|
||||
rd io.ReadSeeker
|
||||
rd io.ReadSeeker // rd is the original file reader
|
||||
|
||||
offset int
|
||||
|
||||
cipher common.StreamDecoder
|
||||
|
||||
key []byte
|
||||
box []byte
|
||||
|
||||
metaRaw []byte
|
||||
metaType string
|
||||
meta RawMeta
|
||||
|
||||
cover []byte
|
||||
audio []byte
|
||||
cover []byte
|
||||
}
|
||||
|
||||
// Validate checks if the file is a valid Netease .ncm file.
|
||||
// rd will be seeked to the beginning of the encrypted audio.
|
||||
func (d *Decoder) Validate() error {
|
||||
if err := d.validateMagicHeader(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user