Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Rirusha committed Apr 5, 2024
1 parent e0642fc commit f33377c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ namespace Cassette {
}

void on_next () {
if (!player.current_track_loading) {
if (player.can_go_next) {
player.next ();
}
}
Expand All @@ -312,6 +312,12 @@ namespace Cassette {
}
}

void on_prev_force () {
if (player.can_go_prev) {
player.prev (true);
}
}

void on_preferences_action () {
var pref_win = new PreferencesDialog ();

Expand Down
4 changes: 2 additions & 2 deletions src/client/player/player.vala
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ public class Cassette.Client.Player.Player : Object {
}

void update_can_go () {
can_go_next = mode.get_next_index (true) != -1;
can_go_prev = mode.get_prev_index () != -1 || playback_pos_sec > 3.0;
can_go_next = mode.get_next_index (true) != -1 && current_track_loading;
can_go_prev = mode.get_prev_index () != -1 || playback_pos_sec > 3.0 && current_track_loading;
}

void reset_play () {
Expand Down

0 comments on commit f33377c

Please sign in to comment.