feat: bt improve

This commit is contained in:
levi committed 2022-10-26 17:18:13 +08:00
1 parent c6aa83194f
commit 0fc133e46d
28 files changed
+1537 -260

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
// gomobile bind -ldflags="-w -s" -o libgopeed.aar -target=android -androidapi 19 -javapkg=com.gopeed github.com/monkeyWie/gopeed-core/bind/mobile
package libgopeed
import (
"encoding/json"
"github.com/monkeyWie/gopeed-core/pkg/rest"
"github.com/monkeyWie/gopeed-core/pkg/rest/model"
)
func Start(cfg string) (int, error) {
var config model.StartConfig
if err := json.Unmarshal([]byte(cfg), &config); err != nil {
return 0, err
}
return rest.Start(&config)
}
func Stop() {
rest.Stop()
}