Merge branch 'next_prev_fix' of https://github.com/DDRBoxman/MPD

This commit is contained in:
Max Kellermann 2024-01-18 09:58:39 +01:00
commit c93fc161dc
1 changed files with 6 additions and 2 deletions

View File

@ -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();
}
});
}
@ -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();
}
});
}