Skip to content

Commit

Permalink
Merge branch 'next_prev_fix' of https://github.com/DDRBoxman/MPD
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Jan 18, 2024
2 parents 87873c9 + 0075c57 commit c93fc16
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,9 @@ Java_org_musicpd_Bridge_playNext(JNIEnv *, jclass)
if (global_instance != nullptr)
BlockingCall(global_instance->event_loop, [&](){
for (auto &partition : global_instance->partitions)
partition.PlayNext();
if (partition.playlist.playing) {
partition.PlayNext();
}
});
}

Expand All @@ -642,7 +644,9 @@ Java_org_musicpd_Bridge_playPrevious(JNIEnv *, jclass)
if (global_instance != nullptr)
BlockingCall(global_instance->event_loop, [&](){
for (auto &partition : global_instance->partitions)
partition.PlayPrevious();
if (partition.playlist.playing) {
partition.PlayPrevious();
}
});
}

Expand Down

0 comments on commit c93fc16

Please sign in to comment.