mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-06 10:22:50 +08:00
Compare commits
2 Commits
8c0a3cf224
...
8674e936e2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8674e936e2 | ||
|
|
0bea12d0b3 |
3
go.mod
3
go.mod
@@ -12,7 +12,7 @@ replace (
|
||||
)
|
||||
|
||||
require (
|
||||
fyne.io/fyne/v2 v2.7.0
|
||||
fyne.io/fyne/v2 v2.7.1
|
||||
github.com/AynaLivePlayer/liveroom-sdk v0.1.0
|
||||
github.com/AynaLivePlayer/miaosic v0.2.5
|
||||
github.com/adrg/libvlc-go/v3 v3.1.6
|
||||
@@ -66,7 +66,6 @@ require (
|
||||
github.com/jeandeaual/go-locale v0.0.0-20250612000132-0ef82f21eade // indirect
|
||||
github.com/jinzhu/copier v0.4.0 // indirect
|
||||
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 // indirect
|
||||
github.com/k0kubun/pp/v3 v3.5.0 // indirect
|
||||
github.com/makiuchi-d/gozxing v0.1.1 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/nicksnyder/go-i18n/v2 v2.5.1 // indirect
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1,5 +1,5 @@
|
||||
fyne.io/fyne/v2 v2.7.0 h1:GvZSpE3X0liU/fqstInVvRsaboIVpIWQ4/sfjDGIGGQ=
|
||||
fyne.io/fyne/v2 v2.7.0/go.mod h1:xClVlrhxl7D+LT+BWYmcrW4Nf+dJTvkhnPgji7spAwE=
|
||||
fyne.io/fyne/v2 v2.7.1 h1:ja7rNHWWEooha4XBIZNnPP8tVFwmTfwMJdpZmLxm2Zc=
|
||||
fyne.io/fyne/v2 v2.7.1/go.mod h1:xClVlrhxl7D+LT+BWYmcrW4Nf+dJTvkhnPgji7spAwE=
|
||||
fyne.io/systray v1.11.1-0.20250603113521-ca66a66d8b58 h1:eA5/u2XRd8OUkoMqEv3IBlFYSruNlXD8bRHDiqm0VNI=
|
||||
fyne.io/systray v1.11.1-0.20250603113521-ca66a66d8b58/go.mod h1:RVwqP9nYMo7h5zViCBHri2FgjXF7H2cub7MAq4NSoLs=
|
||||
github.com/AynaLivePlayer/blivedm-go v0.0.0-20250629154348-690af765bfbc h1:t1fMdqUjB2lR9uuGQ9yWJ7LJ3h1hXhI+LhbTpElPueI=
|
||||
|
||||
@@ -19,3 +19,8 @@ func RunInFyneThread(fn func()) {
|
||||
//fn()
|
||||
fyne.Do(fn)
|
||||
}
|
||||
|
||||
func RunInFyneThreadAndWait(fn func()) {
|
||||
//fn()
|
||||
fyne.DoAndWait(fn)
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ func (w *SourceLogin) Disable() error {
|
||||
if p, ok := miaosic.GetProvider(pname); ok {
|
||||
pl, ok2 := p.(miaosic.Loginable)
|
||||
if ok2 {
|
||||
w.log.Info("save session for %s", pname)
|
||||
w.log.Infof("save session for %s", pname)
|
||||
w.sessions[pname] = pl.SaveSession()
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,9 @@ func (w *SourceLogin) CreatePanel() fyne.CanvasObject {
|
||||
events.ErrorUpdateEvent{Error: err})
|
||||
return
|
||||
}
|
||||
currentUser.SetText(i18n.T("plugin.sourcelogin.current_user.notlogin"))
|
||||
fyne.DoAndWait(func() {
|
||||
currentUser.SetText(i18n.T("plugin.sourcelogin.current_user.notlogin"))
|
||||
})
|
||||
w.sessions[providerChoice.Selected] = ""
|
||||
},
|
||||
)
|
||||
@@ -147,7 +149,9 @@ func (w *SourceLogin) CreatePanel() fyne.CanvasObject {
|
||||
if providerChoice.Selected == "" {
|
||||
return
|
||||
}
|
||||
qrStatus.SetText("")
|
||||
fyne.DoAndWait(func() {
|
||||
qrStatus.SetText("")
|
||||
})
|
||||
w.log.Info("getting a new qr code for login")
|
||||
pvdr, _ := miaosic.GetProvider(providerChoice.Selected)
|
||||
provider := pvdr.(miaosic.Loginable)
|
||||
@@ -165,9 +169,11 @@ func (w *SourceLogin) CreatePanel() fyne.CanvasObject {
|
||||
return
|
||||
}
|
||||
//w.log.Debug("create img from raw data")
|
||||
pic := canvas.NewImageFromReader(bytes.NewReader(data), "qrcode")
|
||||
qrcodeImg.Resource = pic.Resource
|
||||
qrcodeImg.Refresh()
|
||||
fyne.DoAndWait(func() {
|
||||
pic := canvas.NewImageFromReader(bytes.NewReader(data), "qrcode")
|
||||
qrcodeImg.Resource = pic.Resource
|
||||
qrcodeImg.Refresh()
|
||||
})
|
||||
},
|
||||
)
|
||||
finishQrBtn := component.NewAsyncButton(
|
||||
@@ -189,12 +195,16 @@ func (w *SourceLogin) CreatePanel() fyne.CanvasObject {
|
||||
events.ErrorUpdateEvent{Error: err})
|
||||
return
|
||||
}
|
||||
qrStatus.SetText(result.Message)
|
||||
fyne.DoAndWait(func() {
|
||||
qrStatus.SetText(result.Message)
|
||||
})
|
||||
if result.Success {
|
||||
currentLoginSession = nil
|
||||
qrcodeImg.Resource = resource.ImageEmptyQrCode
|
||||
qrcodeImg.Refresh()
|
||||
providerChoice.OnChanged(currentProvider)
|
||||
fyne.DoAndWait(func() {
|
||||
qrcodeImg.Resource = resource.ImageEmptyQrCode
|
||||
qrcodeImg.Refresh()
|
||||
providerChoice.OnChanged(currentProvider)
|
||||
})
|
||||
w.sessions[currentProvider] = provider.SaveSession()
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user