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

View File

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