Skip to content

Commit

Permalink
Fix: Add correct number of songs to sticker based smart playlist #1369
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Nov 7, 2024
1 parent f9bfbcb commit 19ef77a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This is a small bug fix release.
### Changelog

- Upd: Translations
- Fix: Add correct number of songs to sticker based smart playlist #1369
- Fix: Remove duplicate depends in Debian Control file

***
Expand Down
3 changes: 2 additions & 1 deletion src/mpd_worker/smartpls.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,14 @@ static bool mpd_worker_smartpls_update_sticker(struct t_mpd_worker_state *mpd_wo
unsigned i = 0;
struct t_list_node *current;
bool rc = true;
while (i < add_list->length) {
while (add_list->length > 0) {
if (mpd_command_list_begin(mpd_worker_state->partition_state->conn, false)) {
unsigned j = 0;
while ((current = list_shift_first(add_list)) != NULL) {
i++;
j++;
if (mpd_send_playlist_add(mpd_worker_state->partition_state->conn, playlist, current->key) == false) {
list_node_free(current);
mympd_set_mpd_failure(mpd_worker_state->partition_state, "Error adding command to command list mpd_send_playlist_add");
break;
}
Expand Down

0 comments on commit 19ef77a

Please sign in to comment.