mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2026-03-15 14:03:17 +08:00
fix bug/webinfo-add custom template
This commit is contained in:
@@ -90,14 +90,17 @@ func newImageFromPlayerPicture(picture player.Picture) (*canvas.Image, error) {
|
||||
return img, nil
|
||||
} else {
|
||||
uri, err := storage.ParseURI(picture.Url)
|
||||
if err != nil || uri == nil {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if uri == nil {
|
||||
return nil, errors.New("fail to fail url")
|
||||
}
|
||||
img := canvas.NewImageFromURI(uri)
|
||||
if img == nil {
|
||||
// bug fix, return a new error to indicate fail to read an image
|
||||
return nil, errors.New("fail to read image")
|
||||
}
|
||||
return img, err
|
||||
return img, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,21 +202,6 @@ func registerPlayControllerHandler() {
|
||||
PlayController.Cover.Resource = picture.Resource
|
||||
PlayController.Cover.Refresh()
|
||||
}()
|
||||
//uri, err := storage.ParseURI(media.Cover)
|
||||
//if err != nil || uri == nil {
|
||||
// l().Warn("fail to load parse cover url", media.Cover)
|
||||
//}
|
||||
//// async update
|
||||
//go func() {
|
||||
// img := canvas.NewImageFromURI(uri)
|
||||
// if img == nil {
|
||||
// l().Warn("fail to load parse cover url", media.Cover)
|
||||
// PlayController.SetDefaultCover()
|
||||
// return
|
||||
// }
|
||||
// PlayController.Cover.Resource = img.Resource
|
||||
// PlayController.Cover.Refresh()
|
||||
//}()
|
||||
}
|
||||
})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user