update shit

This commit is contained in:
eyjhb 2025-02-07 20:11:23 +01:00
parent dae22a9716
commit 2e3e74e128
Signed by: eyjhb
GPG key ID: 609F508E3239F920

View file

@ -130,8 +130,11 @@ func (mpv *MPVPLayer) finishedVideo() (bool, error) {
mpv.isPlaying = false
if len(mpv.entries) == 1 {
if err := mpv.play(mpv.entries[0].Link); err != nil {
return false, err
if videoPercentageWatched(mpv.VideoPosition(), mpv.VideoDuration()) > 90 {
if err := mpv.play(mpv.entries[0].Link); err != nil {
return false, err
}
}
}
@ -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()