make sure to unpause on PlayFile in MPV player

This commit is contained in:
Drew Weymouth
2024-01-06 14:19:11 -08:00
parent 13e4ff0544
commit 8683999f29
+4 -1
View File
@@ -139,8 +139,11 @@ func (p *Player) PlayFile(url string) error {
}
err := p.mpv.Command([]string{"loadfile", url, "replace"})
if err == nil {
p.setState(player.Playing)
p.lenPlaylist = 1
if p.status.State == player.Paused {
return p.Continue()
}
p.setState(player.Playing)
}
return err
}