This commit is contained in:
Erica Z 2024-10-15 22:48:41 +02:00
parent e6f3dc6e7c
commit 70dcd57194
2 changed files with 7 additions and 4 deletions

View file

@ -36,7 +36,7 @@ class Playbin : Object {
public signal void now_playing (uint index, Song song, int64 duration); public signal void now_playing (uint index, Song song, int64 duration);
// FIXME this should be synced with the selection model, right?? // FIXME this should be synced with the selection model, right??
private uint playing_index; public uint playing_index { get; private set; }
private bool next_gapless; private bool next_gapless;
@ -182,7 +182,8 @@ class Playbin : Object {
} }
} else { } else {
// edge case // edge case
assert (false); // TODO // just flush everything and pray next stream-start is fine
this.begin_playback (this.playing_index);
} }
}); });

View file

@ -189,11 +189,13 @@ class Ui.Window : Adw.ApplicationWindow {
} }
[GtkCallback] private void on_skip_forward_clicked () { [GtkCallback] private void on_skip_forward_clicked () {
//this.play_queue.skip_forward (); this.playbin.begin_playback (this.playbin.playing_index+1);
} }
[GtkCallback] private void on_skip_backward_clicked () { [GtkCallback] private void on_skip_backward_clicked () {
//this.play_queue.skip_backward (); if (this.playbin.playing_index > 0) {
this.playbin.begin_playback (this.playbin.playing_index-1);
}
} }
[GtkCallback] private void show_setup_dialog () { [GtkCallback] private void show_setup_dialog () {