Skip to content

Commit

Permalink
Fix: Do not crop playlists on shuffle #1369
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Nov 7, 2024
1 parent 3b09c2f commit eaf3c07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This is a small bug fix release.

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

***
Expand Down
4 changes: 1 addition & 3 deletions src/mpd_client/playlists.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,12 @@ bool mpd_client_playlist_shuffle(struct t_partition_state *partition_state, cons

//add shuffled songs to tmp playlist
//uses command list to add MPD_COMMANDS_MAX songs at once
unsigned i = 0;
bool rc = true;
while (i < plist.length) {
while (plist.length > 0) {
if (mpd_command_list_begin(partition_state->conn, false) == true) {
unsigned j = 0;
struct t_list_node *current;
while ((current = list_shift_first(&plist)) != NULL) {
i++;
j++;
rc = mpd_send_playlist_add(partition_state->conn, playlist_tmp, current->key);
list_node_free(current);
Expand Down

0 comments on commit eaf3c07

Please sign in to comment.