Commit d58043f140

d58043f140f18f862b81ba964b5bfb71112d3089

parent: 47f7214ac8

Unsigned

Wraient <wraient.911@gmail.com> · 2025-02-26 20:59 UTC

Fix: Hot Fix

- Episode is marked as complete because mpv has opened but video has not started for a fraction of second.

Layout: unified · split

cmd/curd/main.go +9
@@ -484,6 +484,14 @@ func main() {
484484 if err != nil {
485485 internal.Log("Error checking playback status: "+err.Error())
486486 } else if !hasPlayback && anime.Ep.Started {
487 // Wait for a moment to allow playback to start
488 time.Sleep(2 * time.Second) // Wait for 2 seconds
489
490 // Check playback status again
491 hasPlayback, err = internal.HasActivePlayback(anime.Ep.Player.SocketPath)
492 if err != nil {
493 internal.Log("Error checking playback status: " + err.Error())
494 } else if !hasPlayback {
487495 // Nothing is playing, start next episode
488496 internal.Log("Nothing playing in MPV, starting next episode")
489497 anime.Ep.Number++
@@ -491,6 +499,7 @@ func main() {
491499 anime.Ep.IsCompleted = true
492500 close(skipLoopDone)
493501 return
502 }
494503 }
495504
496505 }