update shit
This commit is contained in:
parent
dae22a9716
commit
2e3e74e128
1 changed files with 6 additions and 2 deletions
|
@ -130,9 +130,12 @@ func (mpv *MPVPLayer) finishedVideo() (bool, error) {
|
|||
mpv.isPlaying = false
|
||||
|
||||
if len(mpv.entries) == 1 {
|
||||
if videoPercentageWatched(mpv.VideoPosition(), mpv.VideoDuration()) > 90 {
|
||||
if err := mpv.play(mpv.entries[0].Link); err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return false, nil
|
||||
|
@ -209,6 +212,7 @@ func (mpv *MPVPLayer) ensurePlayer() error {
|
|||
mpv.Unlock()
|
||||
}
|
||||
} else if event.ID == 3 {
|
||||
// TODO: this might not fire once the media ends
|
||||
if event.Data != nil {
|
||||
if event.Data.(bool) == true {
|
||||
mpv.Lock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue