when changing loop mode, only call player.SetNext if needed

This commit is contained in:
Drew Weymouth
2023-12-22 17:22:40 -08:00
parent d089151f85
commit cfb8739a61
2 changed files with 26 additions and 10 deletions
+4
View File
@@ -173,6 +173,10 @@ func (p *Player) SetNextFile(url string) error {
}
p.lenPlaylist--
}
if url == "" {
return nil
}
err := p.mpv.Command([]string{"loadfile", url, "append"})
if err == nil {
p.lenPlaylist++