only send now_playing when playlist-pos is updated
these updates are coalesced, so it's possible that by START_FILE the observed event hasn't had the change to update the property
This commit is contained in:
parent
2f99ae9edf
commit
f8ad4cd36d
1 changed files with 2 additions and 4 deletions
|
@ -124,6 +124,8 @@ class Playbin : GLib.Object {
|
|||
} else {
|
||||
this.play_queue_position = (uint) data.parse_int64 ();
|
||||
debug (@"playlist-pos has been updated to $(this.play_queue_position)");
|
||||
this.song = (Subsonic.Song) this.play_queue.get_item (this.play_queue_position);
|
||||
this.now_playing ();
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -135,10 +137,6 @@ class Playbin : GLib.Object {
|
|||
|
||||
case Mpv.EventId.START_FILE:
|
||||
debug ("START_FILE received");
|
||||
if (this.play_queue_position < this.play_queue.get_n_items ()) {
|
||||
this.song = (Subsonic.Song) this.play_queue.get_item (this.play_queue_position);
|
||||
this.now_playing ();
|
||||
}
|
||||
break;
|
||||
|
||||
case Mpv.EventId.END_FILE:
|
||||
|
|
Loading…
Reference in a new issue