commit c86624f6da4f8dd827f4f5211822e8de74fca083 from: Omar Polo date: Thu Mar 10 16:30:37 2022 UTC don't try to match the prev/next song; been broken since tx in load was added originally i tried to match the previous or next song in the playing queue after a load command if the current song was not matched. The idea is ok-ish, but the implementation was broken and become a no-op after some recent refactoring in that area. commit - 56b5b3c673442fe9229f6c502a7d039d3850f6c8 commit + c86624f6da4f8dd827f4f5211822e8de74fca083 blob - c894ac7b7947fadaf474b84d9092827a6c926ff5 blob + 3db2815c6b8aeb82a2d7d9efc18ba3b6de7e037a --- playlist.c +++ playlist.c @@ -53,21 +53,11 @@ playlist_swap(struct playlist *p, ssize_t off) off = -1; if (current_song != NULL && off < 0) { - /* try to adjust play_off to match the same song */ + /* try to match the currently played song */ for (i = 0; i < p->len; ++i) { if (!strcmp(current_song, p->songs[i])) break; } - /* try to match one song before */ - if (i == p->len && play_off >= 1) - for (i = 0; i < p->len; ++i) - if (!strcmp(current_song, p->songs[i])) - break; - /* or one song after */ - if (i == p->len && play_off < playlist.len-1) - for (i = 0; i < p->len; ++i) - if (!strcmp(current_song, p->songs[i])) - break; if (i == p->len) i = -1; }