fix edge case when stopping and then selecting something

This commit is contained in:
Erica Z 2024-10-26 17:30:58 +02:00
parent 175563ba76
commit a82b5b0475

View file

@ -220,8 +220,9 @@ public class Playbin : GLib.Object {
requires (position < this.play_queue.get_n_items ()) requires (position < this.play_queue.get_n_items ())
{ {
assert (this.mpv.command ({"playlist-play-index", position.to_string ()}) >= 0); assert (this.mpv.command ({"playlist-play-index", position.to_string ()}) >= 0);
this.state = PlaybinState.PLAYING;
this.play_queue_position = position; this.play_queue_position = position;
this.state = PlaybinState.PLAYING;
this.play (); // make sure mpv actually starts playing the track
} }
public void pause () { public void pause () {