Skip to content

Commit

Permalink
直播间不存在不再弹窗
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbjun committed Jul 28, 2021
1 parent ef4b698 commit 76750c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion api/huya.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func extractUrl(content string) ([]ResultUrl, error) {
parse := gjson.Parse(content)
streamInfo := parse.Get("roomInfo.tLiveInfo.tLiveStreamInfo.vStreamInfo.value")
if !streamInfo.Exists() || len(streamInfo.Array()) == 0 {
return nil, errors.New("未开播或直播间不存在")
return nil, nil
}
var result []ResultUrl
streamInfo.ForEach(func(key, value gjson.Result) bool {
Expand Down
2 changes: 0 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ func (app *App) init() {
app.entry = entry

app.button = widget.NewButton("提交", app.submit)

list := widget.NewList(
func() int {
return len(app.dataList)
Expand All @@ -89,7 +88,6 @@ func (app *App) init() {
}
}
app.list = list

app.top = container.NewHBox()
recent, err := app.loadRecent()
if err == nil && len(recent) > 0 {
Expand Down

0 comments on commit 76750c2

Please sign in to comment.