Code refactoring for xiaomi source

This commit is contained in:
Alex X
2026-01-17 10:06:13 +03:00
parent 9a1eac8ef4
commit 425fcffbe1
5 changed files with 14 additions and 40 deletions
+1 -10
View File
@@ -85,10 +85,7 @@ func xiaofangLogin(conn *tutk.Conn, password string) error {
}
_, data, err = conn.ReadCommand()
if err != nil {
return err
}
return nil
return err
}
type Client struct {
@@ -110,14 +107,8 @@ func (c *Client) ReadPacket() (hdr, payload []byte, err error) {
switch hdr[0] {
case tutk.CodecH264, tutk.CodecH265:
payload, err = DecodeVideo(payload, c.key)
if err != nil {
return
}
case tutk.CodecAAC:
payload, err = crypto.Decode(payload, c.key)
if err != nil {
return
}
}
}
return